codope commented on code in PR #10352:
URL: https://github.com/apache/hudi/pull/10352#discussion_r1456708282
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1901,4 +1909,162 @@ private static Path filePath(String basePath, String
partition, String filename)
return new Path(basePath, partition + Path.SEPARATOR + filename);
}
}
+
+ public static HoodieData<HoodieRecord>
convertFilesToPartitionStatsRecords(HoodieEngineContext engineContext,
+
List<DirectoryInfo> partitionInfoList,
+
MetadataRecordsGenerationParams recordsGenerationParams) {
+ // Find the columns to index
+ HoodieTableMetaClient dataTableMetaClient =
recordsGenerationParams.getDataMetaClient();
+ final List<String> columnsToIndex = getColumnsToIndex(
+ recordsGenerationParams,
+ Lazy.lazily(() -> tryResolveSchemaForTable(dataTableMetaClient)));
+ if (columnsToIndex.isEmpty()) {
+ return engineContext.emptyHoodieData();
+ }
+ LOG.info(String.format("Indexing %d columns for partition stats index",
columnsToIndex.size()));
Review Comment:
changed to debug mode.. was more for lcoal testing.
##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -26,6 +26,7 @@
*/
public enum MetadataPartitionType {
FILES(HoodieTableMetadataUtil.PARTITION_NAME_FILES, "files-"),
+ PARTITION_STATS(HoodieTableMetadataUtil.PARTITION_NAME_PARTITION_STATS,
"part-stats-"),
Review Comment:
done
--
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]