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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -751,12 +749,8 @@ public static HoodieData<HoodieRecord> 
convertMetadataToColumnStatsRecords(Hoodi
     return engineContext.parallelize(deleteFileList, parallelism)
         .flatMap(deleteFileInfoPair -> {
           String partitionPath = deleteFileInfoPair.getLeft();
-          String filePath = deleteFileInfoPair.getRight();
-
-          if (filePath.endsWith(HoodieFileFormat.PARQUET.getFileExtension()) 
|| ExternalFilePathUtil.isExternallyCreatedFile(filePath)) {
-            return getColumnStatsRecords(partitionPath, filePath, 
dataMetaClient, columnsToIndex, true).iterator();
-          }
-          return Collections.emptyListIterator();
+          String filePath = partitionPath.equals(EMPTY_PARTITION_NAME) ? 
deleteFileInfoPair.getRight() : partitionPath + "/" + 
deleteFileInfoPair.getRight();
+          return getColumnStatsRecords(partitionPath, filePath, 
dataMetaClient, columnsToIndex, true).iterator();

Review Comment:
   The partition path is already there, can we refactor the method 
`getColumnStatsRecords` to pass around the file name instead of file path?



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