vamshikrishnakyatham commented on code in PR #14138:
URL: https://github.com/apache/hudi/pull/14138#discussion_r2459106395
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngradeUtils.java:
##########
@@ -294,12 +295,24 @@ public static void
dropNonV1IndexPartitions(HoodieWriteConfig config, HoodieEngi
HoodieTable table,
SupportsUpgradeDowngrade upgradeDowngradeHelper, String operationType) {
HoodieTableMetaClient metaClient = table.getMetaClient();
try (BaseHoodieWriteClient writeClient =
upgradeDowngradeHelper.getWriteClient(config, context)) {
- List<String> mdtPartitions =
metaClient.getTableConfig().getMetadataPartitions()
+ Set<String> metadataPartitions =
metaClient.getTableConfig().getMetadataPartitions();
+ List<String> mdtPartitions = metadataPartitions
.stream()
.filter(partition ->
metaClient.getIndexForMetadataPartition(partition)
.map(indexDef ->
HoodieIndexVersion.V1.lowerThan(indexDef.getVersion()))
.orElse(false))
.collect(Collectors.toList());
+
+ // If col stats V2 is being deleted and partition stats exists, delete
partition stats as well
+ // This handles the case where partition stats might not have an index
definition in index.json
+ String colStatsPartition =
MetadataPartitionType.COLUMN_STATS.getPartitionPath();
+ String partitionStatsPartition =
MetadataPartitionType.PARTITION_STATS.getPartitionPath();
Review Comment:
I think it should be fine as it doesn't affect the existing logic and would
be easy later when the index def is fixed
--
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]