jintaoguan commented on a change in pull request #2627:
URL: https://github.com/apache/hudi/pull/2627#discussion_r596332002



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/NonpartitionedAvroKeyGenerator.java
##########
@@ -45,6 +51,18 @@ public String getPartitionPath(GenericRecord record) {
     return EMPTY_PARTITION_FIELD_LIST;
   }
 
+  @Override
+  public String getRecordKey(GenericRecord record) {
+    // the format of record key varies due to the number of record key fields
+    // 1. if there is only one record key field, the format of record key is 
just "<value>"
+    // 2. if there are multiple record key fields, the format is 
"<field1>:<value1>,<field2>:<value2>,..."
+    // for backward compatibility, we need to use the right format according 
to the number of record key fields

Review comment:
       Updated the code according to your suggestion.




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

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


Reply via email to