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: [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]

Reply via email to