[ 
https://issues.apache.org/jira/browse/HIVE-25587?focusedWorklogId=659520&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-659520
 ]

ASF GitHub Bot logged work on HIVE-25587:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Oct/21 11:54
            Start Date: 04/Oct/21 11:54
    Worklog Time Spent: 10m 
      Work Description: 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-unsubscr...@hive.apache.org

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 659520)
    Time Spent: 1h 10m  (was: 1h)

> Disable Iceberg table migration for unsupported source file formats
> -------------------------------------------------------------------
>
>                 Key: HIVE-25587
>                 URL: https://issues.apache.org/jira/browse/HIVE-25587
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Currently, we only support migrating ORC, Parquet and Avro tables to Iceberg. 
> However, there is no check in the code to fail early for other formats (e.g. 
> text, json, rcfile), which can lead to wasted effort at best, and leaving the 
> source table unusable at worst. Therefore, we should check the source format 
> early and shortcircuit for unsupported types.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to