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/10/04 11:54:59 UTC

[GitHub] [hive] szlta commented on a change in pull request #2696: HIVE-25587: Disable Iceberg table migration for unsupported source fi…

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



##########
File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java
##########
@@ -95,14 +98,17 @@
       AlterTableType.ADDCOLS, AlterTableType.REPLACE_COLUMNS, AlterTableType.RENAME_COLUMN,
       AlterTableType.ADDPROPS, AlterTableType.DROPPROPS, AlterTableType.SETPARTITIONSPEC,
       AlterTableType.UPDATE_COLUMNS);
+  private static final List<String> MIGRATION_ALLOWED_SOURCE_FORMATS = Arrays.stream(FileFormat.values())
+      .filter(f -> !f.equals(FileFormat.METADATA))
+      .map(FileFormat::name).map(String::toLowerCase).collect(Collectors.toList());

Review comment:
       I think it would probably be better to list the formats instead i.e. Lists.newArrayList(FileFormat.PARQUET, .. etc). That way it's more readable and safer from a very unlikely scenario a new enum value is added in the future.




-- 
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: gitbox-unsubscribe@hive.apache.org

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