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/10/11 06:59:35 UTC

[GitHub] [hudi] voonhous commented on a diff in pull request #6915: [HUDI-5004] Allow nested field as primary key and preCombineField in flink sql

voonhous commented on code in PR #6915:
URL: https://github.com/apache/hudi/pull/6915#discussion_r991885011


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -132,7 +133,7 @@ private void sanityCheck(Configuration conf, ResolvedSchema schema) {
       }
 
       Arrays.stream(recordKeys)
-          .filter(field -> !fields.contains(field))
+          .filter(field -> !fields.contains(getRootLevelFieldName(field)))
           .findAny()

Review Comment:
   Uhm, from what i understand, Spark-SQL supports nested primaryKey and precombineField.
   
   The changes I made here are to standardize the validations in Spark and Flink.
   https://issues.apache.org/jira/browse/HUDI-4051
   https://github.com/apache/hudi/pull/5517/files



##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -132,7 +133,7 @@ private void sanityCheck(Configuration conf, ResolvedSchema schema) {
       }
 
       Arrays.stream(recordKeys)
-          .filter(field -> !fields.contains(field))
+          .filter(field -> !fields.contains(getRootLevelFieldName(field)))
           .findAny()

Review Comment:
   Uhm, from what i understand, Spark-SQL supports nested primaryKey and precombineField.
   
   The changes I made here is to standardize the validations in Spark and Flink.
   https://issues.apache.org/jira/browse/HUDI-4051
   https://github.com/apache/hudi/pull/5517/files



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