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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -254,7 +254,7 @@ public class HoodieTableConfig extends HoodieConfig {
       .key("hoodie.populate.meta.fields")
       .defaultValue(true)
       .withDocumentation("When enabled, populates all meta fields. When 
disabled, no meta fields are populated "
-          + "and incremental queries will not be functional. This is only 
meant to be used for append only/immutable data for batch processing");
+          + "and incremental queries will not be functional. In the disabled 
state, the number of record key fields must be equal to one.");

Review Comment:
   Yeah, it looks like there is a limitation in the code:
   
   ```java
   public static <R> HoodieRecord<R> convertToHoodieRecordPayload(GenericRecord 
record, String payloadClazz,
                                                                    String 
preCombineField,
                                                                    
Pair<String, String> recordKeyPartitionPathFieldPair,
                                                                    boolean 
withOperationField,
                                                                    
Option<String> partitionName,
                                                                    
Option<Schema> schemaWithoutMetaFields) {
       final String recKey = 
record.get(recordKeyPartitionPathFieldPair.getKey()).toString();
       final String partitionPath = (partitionName.isPresent() ? 
partitionName.get() :
           record.get(recordKeyPartitionPathFieldPair.getRight()).toString());
   ```
   
   I think we should support composite record keys for non-metadata fields use 
cases in the near 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]

Reply via email to