yihua commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2371635055
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -2540,33 +2615,36 @@ public HoodieRecord next() {
private static Stream<HoodieRecord> collectAndProcessColumnMetadata(
List<List<HoodieColumnRangeMetadata<Comparable>>> fileColumnMetadata,
String partitionPath, boolean isTightBound,
- Map<String, Schema> colsToIndexSchemaMap
+ Map<String, Schema> colsToIndexSchemaMap,
+ HoodieIndexVersion partitionStatsIndexVersion
) {
- return collectAndProcessColumnMetadata(partitionPath, isTightBound,
Option.empty(), fileColumnMetadata.stream().flatMap(List::stream),
colsToIndexSchemaMap);
+ return collectAndProcessColumnMetadata(partitionPath, isTightBound,
Option.empty(), fileColumnMetadata.stream().flatMap(List::stream),
colsToIndexSchemaMap, partitionStatsIndexVersion);
}
private static Stream<HoodieRecord>
collectAndProcessColumnMetadata(Iterable<HoodieColumnRangeMetadata<Comparable>>
fileColumnMetadataIterable, String partitionPath,
boolean
isTightBound, Option<String> indexPartitionOpt,
-
Map<String, Schema> colsToIndexSchemaMap
+
Map<String, Schema> colsToIndexSchemaMap,
+
HoodieIndexVersion partitionStatsIndexVersion
) {
List<HoodieColumnRangeMetadata<Comparable>> fileColumnMetadata = new
ArrayList<>();
fileColumnMetadataIterable.forEach(fileColumnMetadata::add);
// Group by Column Name
- return collectAndProcessColumnMetadata(partitionPath, isTightBound,
indexPartitionOpt, fileColumnMetadata.stream(), colsToIndexSchemaMap);
+ return collectAndProcessColumnMetadata(partitionPath, isTightBound,
indexPartitionOpt, fileColumnMetadata.stream(), colsToIndexSchemaMap,
partitionStatsIndexVersion);
}
private static Stream<HoodieRecord> collectAndProcessColumnMetadata(String
partitionPath, boolean isTightBound, Option<String> indexPartitionOpt,
Stream<HoodieColumnRangeMetadata<Comparable>> fileColumnMetadata,
-
Map<String, Schema> colsToIndexSchemaMap
+
Map<String, Schema> colsToIndexSchemaMap,
+
HoodieIndexVersion partitionStatsIndexVersion
) {
// Group by Column Name
Map<String, List<HoodieColumnRangeMetadata<Comparable>>> columnMetadataMap
=
fileColumnMetadata.collect(Collectors.groupingBy(HoodieColumnRangeMetadata::getColumnName,
Collectors.toList()));
// Aggregate Column Ranges
Stream<HoodieColumnRangeMetadata<Comparable>> partitionStatsRangeMetadata
= columnMetadataMap.entrySet().stream()
- .map(entry -> FileFormatUtils.getColumnRangeInPartition(partitionPath,
entry.getValue(), colsToIndexSchemaMap));
+ .map(entry -> FileFormatUtils.getColumnRangeInPartition(partitionPath,
entry.getKey(), entry.getValue(),
colsToIndexSchemaMap,partitionStatsIndexVersion));
Review Comment:
```suggestion
.map(entry ->
FileFormatUtils.getColumnRangeInPartition(partitionPath, entry.getKey(),
entry.getValue(), colsToIndexSchemaMap, partitionStatsIndexVersion));
```
--
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]