yihua commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2302167486
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -575,10 +576,11 @@ private Pair<List<String>, Pair<Integer,
HoodieData<HoodieRecord>>> initializeCo
if (partitionIdToAllFilesMap.isEmpty()) {
return Pair.of(Collections.emptyList(), Pair.of(fileGroupCount,
engineContext.emptyHoodieData()));
}
+ HoodieIndexVersion columnStatsIndexVersion =
existingIndexVersionOrDefault(PARTITION_NAME_COLUMN_STATS, dataMetaClient);
// Find the columns to index
final List<String> columnsToIndex = new
ArrayList<>(HoodieTableMetadataUtil.getColumnsToIndex(dataMetaClient.getTableConfig(),
dataWriteConfig.getMetadataConfig(), tableSchema, true,
-
Option.of(dataWriteConfig.getRecordMerger().getRecordType())).keySet());
+ Option.of(dataWriteConfig.getRecordMerger().getRecordType()),
columnStatsIndexVersion).keySet());
Review Comment:
Avoid deriving the index version here and pass the meta client to
`getColumnsToIndex` so that the logic of getting index version can be hided
inside `getColumnsToIndex`?
--
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]