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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -970,18 +966,15 @@ public static HoodieData<HoodieRecord> 
convertFilesToColumnStatsRecords(HoodieEn
     final List<Tuple3<String, String, Boolean>> partitionFileFlagTupleList = 
fetchPartitionFileInfoTriplets(partitionToDeletedFiles, 
partitionToAppendedFiles);
 
     // Create records MDT
+    Option<Schema> writerSchemaOpt = fetchStatsForLogFiles ? 
tryResolveSchemaForTable(dataMetaClient) : Option.empty();
     int parallelism = Math.max(Math.min(partitionFileFlagTupleList.size(), 
columnStatsIndexParallelism), 1);
     return engineContext.parallelize(partitionFileFlagTupleList, 
parallelism).flatMap(partitionFileFlagTuple -> {
       final String partitionName = partitionFileFlagTuple.f0;
       final String filename = partitionFileFlagTuple.f1;
       final boolean isDeleted = partitionFileFlagTuple.f2;
-      if (!FSUtils.isBaseFile(new StoragePath(filename)) || 
!filename.endsWith(HoodieFileFormat.PARQUET.getFileExtension())) {
-        LOG.warn("Ignoring file {} as it is not a PARQUET file", filename);
-        return Stream.<HoodieRecord>empty().iterator();
-      }
-
-      final String filePathWithPartition = partitionName + "/" + filename;
-      return getColumnStatsRecords(partitionName, filePathWithPartition, 
dataMetaClient, columnsToIndex, isDeleted).iterator();
+      final String filePathWithPartition = 
partitionName.equals(NON_PARTITIONED_NAME) ? filename : partitionName + "/" + 
filename;
+      return getColumnStatsRecords(partitionName, filePathWithPartition, 
dataMetaClient, columnsToIndex, isDeleted,

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