codope commented on code in PR #12159:
URL: https://github.com/apache/hudi/pull/12159#discussion_r1818893117


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieMetadataTableValidator.java:
##########
@@ -1730,13 +1743,28 @@ public List<HoodieColumnRangeMetadata<Comparable>> 
getSortedColumnStatsList(
       } else {
         FileFormatUtils formatUtils = 
HoodieIOFactory.getIOFactory(metaClient.getStorage())
             .getFileFormatUtils(HoodieFileFormat.PARQUET);
-        return fileNames.stream().flatMap(filename ->
-                formatUtils.readColumnStatsFromMetadata(
-                        metaClient.getStorage(),
-                        new 
StoragePath(FSUtils.constructAbsolutePath(metaClient.getBasePath(), 
partitionPath), filename),
-                        allColumnNameList).stream())
-            .sorted(new HoodieColumnRangeMetadataComparator())
-            .collect(Collectors.toList());
+        Schema readerSchema = new 
TableSchemaResolver(metaClient).getTableAvroSchema();

Review Comment:
   can we reuse the schema available in the validation context?



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