You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/04/27 02:42:26 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #5434: [HUDI-3978] Fix use of partition path field as hive partition field in flink

danny0405 commented on code in PR #5434:
URL: https://github.com/apache/hudi/pull/5434#discussion_r859325849


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/FilePathUtils.java:
##########
@@ -420,9 +420,9 @@ public static org.apache.flink.core.fs.Path toFlinkPath(Path path) {
    * @return array of the partition fields
    */
   public static String[] extractPartitionKeys(org.apache.flink.configuration.Configuration conf) {
-    if (FlinkOptions.isDefaultValueDefined(conf, FlinkOptions.PARTITION_PATH_FIELD)) {
+    if (FlinkOptions.isDefaultValueDefined(conf, FlinkOptions.HIVE_SYNC_PARTITION_FIELDS)) {
       return new String[0];
     }
-    return conf.getString(FlinkOptions.PARTITION_PATH_FIELD).split(",");
+    return conf.getString(FlinkOptions.HIVE_SYNC_PARTITION_FIELDS).split(",");
   }

Review Comment:
   Got you, then in `HiveSyncContext`, you can take the option `HIVE_SYNC_PARTITION_FIELDS` instead, and write a new tool method(you should not modify the existing method directly), if user does not configure the `HIVE_SYNC_PARTITION_FIELDS`, fallback to hudi table's partition path (the current code does so).



-- 
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: commits-unsubscribe@hudi.apache.org

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