nsivabalan commented on code in PR #8107:
URL: https://github.com/apache/hudi/pull/8107#discussion_r1131837703


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/ComplexAvroKeyGenerator.java:
##########
@@ -44,6 +47,11 @@ public ComplexAvroKeyGenerator(TypedProperties props) {
 
   @Override
   public String getRecordKey(GenericRecord record) {
+    if (doAutoGenerateRecordKeys()) {
+      // To fetch partition path, caller will have to call getKey() on 
KeyGenerator and call .getPartitionPath. Hence we have to pass empty field to 
support
+      // returning partition path for the callers.

Review Comment:
   yes, unfortunately thats how it is. bcoz, oru KeyGenerator abstract class 
exposes only getter of HoodieKey. and hence to fetch record keys, callers call 
getKey(GenRec).getPartitionPath. 
   We have a ticket to fix some code refactoring around record key generation 
and partition path. 
   For eg refer to https://github.com/apache/hudi/pull/7699
   HUDI-5535. 
   



-- 
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-unsubscr...@hudi.apache.org

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

Reply via email to