nsivabalan commented on a change in pull request #3315: URL: https://github.com/apache/hudi/pull/3315#discussion_r678660798
########## File path: hudi-common/src/main/java/org/apache/hudi/common/util/SpillableMapUtils.java ########## @@ -110,8 +110,15 @@ public static long generateChecksum(byte[] data) { * Utility method to convert bytes to HoodieRecord using schema and payload class. */ public static <R> R convertToHoodieRecordPayload(GenericRecord rec, String payloadClazz) { - String recKey = rec.get(HoodieRecord.RECORD_KEY_METADATA_FIELD).toString(); - String partitionPath = rec.get(HoodieRecord.PARTITION_PATH_METADATA_FIELD).toString(); + return convertToHoodieRecordPayload(rec, payloadClazz, HoodieRecord.RECORD_KEY_METADATA_FIELD, HoodieRecord.PARTITION_PATH_METADATA_FIELD); Review comment: I had this dilemma too and this was my reasoning. Conversion of genRecord to HoodieRecord is confined within SpillableMapUtils. and hence felt it makes sense that this class decides whether to use HoodieRecord.RECORD_KEY_METADATA_FIELD or what the caller has passed in. If not, then HoodieRecord.RECORD_KEY_METADATA_FIELD has to be passed in by all N callers to this method. Felt we are leaking this hoodie's meta field into to other classes. -- 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