private void setDeleteModeOnTableProperties(Table icebergTbl, Map<String, String> newProps,
      EnvironmentContext context) {
    // Hive only supports merge-on-read delete mode, it will actually throw an error if DML operations are attempted on
    // tables that don't have this (the default is copy-on-write). We set this at table creation and v1->v2 conversion.
    if ((icebergTbl == null || ((BaseTable) icebergTbl).operations().current().formatVersion() == 1) &&
        IcebergTableUtil.isV2Table(newProps)) {
      List<String> writeModeList = Arrays.asList(DELETE_MODE, UPDATE_MODE, MERGE_MODE);
      writeModeList.stream()
          .filter(writeMode -> catalogProperties.get(writeMode) == null)
          .forEach(writeMode -> {
            catalogProperties.put(writeMode, HiveIcebergStorageHandler.MERGE_ON_READ);
            newProps.put(writeMode, HiveIcebergStorageHandler.MERGE_ON_READ);
          });

      if (context != null) {
        Splitter splitter = Splitter.on(PROPERTIES_SEPARATOR);
        Map<String, String> contextProperties = context.getProperties();
        if (contextProperties.containsKey(SET_PROPERTIES)) {
          String propValue = context.getProperties().get(SET_PROPERTIES);
          String writeModeStr = writeModeList.stream().filter(writeMode ->
              !splitter.splitToList(propValue).contains(writeMode)).collect(Collectors.joining("'"));
          if (!writeModeStr.isEmpty()) {
            contextProperties.put(SET_PROPERTIES, propValue + "'" + writeModeStr);
          }
        }
      }
    }
  }
Calculates the properties we would like to send to the catalog.
<ul>
<li>The base of the properties is the properties stored at the Hive Metastore for the given table
<li>We add the {@link Catalogs#LOCATION} as the table location
<li>We add the {@link Catalogs#NAME} as TableIdentifier defined by the database name and table name
<li>We add the serdeProperties of the HMS table
<li>We remove some parameters that we don't want to push down to the Iceberg table props
</ul>
@param hmsTable Table for which we are calculating the properties
@return The properties we can provide for Iceberg functions, like {@link Catalogs}
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java