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/12/02 03:30:40 UTC

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

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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -120,6 +122,7 @@ public Set<ConfigOption<?>> optionalOptions() {
    */
   private void sanityCheck(Configuration conf, ResolvedSchema schema) {
     List<String> fields = schema.getColumnNames();
+    Schema inferredSchema = AvroSchemaConverter.convertToSchema(schema.toPhysicalRowDataType().notNull().getLogicalType());
 

Review Comment:
   There is no need to convert the `ResolvedSchema` as an avro schema for validation, the `ResolvedSchema#getColumnDataTypes` can fetch the data type of each field.
   
   Also we need to fix the `RowDataKeyGen#getRecordKey` for nested primary keys.



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