pratyakshsharma commented on a change in pull request #1433:
URL: https://github.com/apache/incubator-hudi/pull/1433#discussion_r414432686



##########
File path: 
hudi-spark/src/main/java/org/apache/hudi/keygen/ComplexKeyGenerator.java
##########
@@ -64,6 +62,32 @@ public HoodieKey getKey(GenericRecord record) {
       throw new HoodieKeyException("Unable to find field names for record key 
or partition path in cfg");
     }
 
+    String recordKey = getRecordKey(record);
+    StringBuilder partitionPath = new StringBuilder();
+    for (String partitionPathField : partitionPathFields) {
+      partitionPath.append(getPartitionPath(record, partitionPathField));
+      partitionPath.append(DEFAULT_PARTITION_PATH_SEPARATOR);
+    }
+    partitionPath.deleteCharAt(partitionPath.length() - 1);
+
+    return new HoodieKey(recordKey, partitionPath.toString());
+  }
+
+  @Override
+  public String getPartitionPath(GenericRecord record, String 
partitionPathField) {

Review comment:
       Yes. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to