danny0405 commented on code in PR #12105:
URL: https://github.com/apache/hudi/pull/12105#discussion_r1807996328


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1241,34 +1243,35 @@ private static Stream<HoodieRecord> 
getColumnStatsRecords(String partitionPath,
       return HoodieMetadataPayload.createColumnStatsRecords(partitionPath, 
columnRangeMetadataList, true);
     }
 
+    String partitionPathFileName = partitionPath.equals(EMPTY_PARTITION_NAME) 
? fileName : partitionPath + "/" + fileName;
     List<HoodieColumnRangeMetadata<Comparable>> columnRangeMetadata =
-        readColumnRangeMetadataFrom(filePartitionPath, datasetMetaClient, 
columnsToIndex, false, Option.empty());
+        readColumnRangeMetadataFrom(partitionPathFileName, datasetMetaClient, 
columnsToIndex, fetchStatsForLogFiles, writerSchemaOpt, maxBufferSize);
 
     return HoodieMetadataPayload.createColumnStatsRecords(partitionPath, 
columnRangeMetadata, false);
   }
 
-  private static List<HoodieColumnRangeMetadata<Comparable>> 
readColumnRangeMetadataFrom(String filePath,
+  private static List<HoodieColumnRangeMetadata<Comparable>> 
readColumnRangeMetadataFrom(String partitionPathFileName,

Review Comment:
   Can we refactor `readColumnRangeMetadataFrom` to pass around `partitionPath` 
and `fileName` too so that we can eliminate the `subString/lastIndexOf`?



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