deniskuzZ commented on code in PR #4890:
URL: https://github.com/apache/hive/pull/4890#discussion_r1401725914
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -1581,22 +1582,21 @@ public void
prepareAlterTableEnvironmentContext(AbstractAlterTableDesc alterTabl
public void
setTableParametersForCTLT(org.apache.hadoop.hive.ql.metadata.Table tbl,
CreateTableLikeDesc desc,
Map<String, String> origParams) {
// Preserve the format-version of the iceberg table and filter out rest.
- String formatVersion = origParams.get(TableProperties.FORMAT_VERSION);
- if ("2".equals(formatVersion)) {
- tbl.getParameters().put(TableProperties.FORMAT_VERSION, formatVersion);
+ if (IcebergTableUtil.isV2Table(origParams)) {
+ tbl.getParameters().put(TableProperties.FORMAT_VERSION, "2");
tbl.getParameters().put(TableProperties.DELETE_MODE, MERGE_ON_READ);
tbl.getParameters().put(TableProperties.UPDATE_MODE, MERGE_ON_READ);
tbl.getParameters().put(TableProperties.MERGE_MODE, MERGE_ON_READ);
}
// check if the table is being created as managed table, in that case we
translate it to external
- if (!desc.isExternal()) {
+ if (!HiveTableUtil.isExternalTable(origParams)) {
Review Comment:
sorry, reverted, I misunderstood the use of that config
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]