You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/06/07 13:52:29 UTC

[GitHub] [hive] szlta commented on a change in pull request #2351: HIVE-25200: Alter table add columns support for Iceberg tables

szlta commented on a change in pull request #2351:
URL: https://github.com/apache/hive/pull/2351#discussion_r646608043



##########
File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
##########
@@ -265,9 +287,12 @@ public void commitAlterTable(org.apache.hadoop.hive.metastore.api.Table hmsTable
       HiveTableUtil.importFiles(preAlterTableProperties.tableLocation, preAlterTableProperties.format,
           partitionSpecProxy, preAlterTableProperties.partitionKeys, catalogProperties, conf);
     } else {
-      Map<String, String> contextProperties = context.getProperties();
-      if (contextProperties.containsKey(ALTER_TABLE_OPERATION_TYPE) &&
-          allowedAlterTypes.contains(contextProperties.get(ALTER_TABLE_OPERATION_TYPE))) {
+      if (isMatchingAlterOp(AlterTableType.ADDCOLS, context) && updateSchema != null) {

Review comment:
       Ok this is now stored as a state of this hook.
   I usually like to be more restrictive, so I'd rather leave the ADDCOL op type check (btw I'm not sure how valid this case is, but if there are no new columns, then we have a case for ADDCOL op type with null updateSchema ;) )




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org