the-other-tim-brown commented on code in PR #13138:
URL: https://github.com/apache/hudi/pull/13138#discussion_r2043431639


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -395,24 +390,17 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>> 
fetchBaseFileRecordsByK
       result = toStream(records)
           .map(record -> {
             GenericRecord data = (GenericRecord) record.getData();
-            return Pair.of(
-                (String) (data).get(HoodieMetadataPayload.KEY_FIELD_NAME),
-                composeRecord(data, partitionName));
+            String recordKey = (String) 
data.get(HoodieMetadataPayload.KEY_FIELD_NAME);
+            return Pair.of(recordKey, composeRecord(data, recordKey, 
partitionName));
           })
           .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
     }
     return result;
   }
 
-  private HoodieRecord<HoodieMetadataPayload> composeRecord(GenericRecord 
avroRecord, String partitionName) {
-    if (metadataTableConfig.populateMetaFields()) {
-      return SpillableMapUtils.convertToHoodieRecordPayload(avroRecord,
-          metadataTableConfig.getPayloadClass(), 
metadataTableConfig.getPreCombineField(), false);
-    }
-    return SpillableMapUtils.convertToHoodieRecordPayload(avroRecord,
-        metadataTableConfig.getPayloadClass(), 
metadataTableConfig.getPreCombineField(),
-        Pair.of(metadataTableConfig.getRecordKeyFieldProp(), 
metadataTableConfig.getPartitionFieldProp()),
-        false, Option.of(partitionName), Option.empty());
+  private HoodieRecord<HoodieMetadataPayload> composeRecord(GenericRecord 
avroRecord, String recordKey, String partitionName) {

Review Comment:
   Or do you mean in the methods calling this where the record key is lookup 
from the key field instead of the hoodie metadata field, we want a comment 
saying that the metadata fields are not present?



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