yihua commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2349996170


##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/table/upgrade/TestEightToNineUpgradeHandler.java:
##########
@@ -305,7 +306,7 @@ private void assertPayloadClassChange(Map<ConfigProperty, 
String> propertiesToAd
     }
   }
 
-  @Test
+  @Disabled

Review Comment:
   Why are these tests disabled?  Will the upgrade and downgrade handling of 
column stats index fix these tests?



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieAppendHandle.java:
##########
@@ -427,15 +429,17 @@ protected void processAppendResult(AppendResult result, 
Option<HoodieLogBlock> d
     updateWriteStatus(result, stat);
 
     if (config.isMetadataColumnStatsIndexEnabled()) {
+      HoodieIndexVersion indexVersion = 
HoodieTableMetadataUtil.existingIndexVersionOrDefault(PARTITION_NAME_COLUMN_STATS,
 hoodieTable.getMetaClient());
       Set<String> columnsToIndexSet = new HashSet<>(HoodieTableMetadataUtil
           .getColumnsToIndex(hoodieTable.getMetaClient().getTableConfig(),
               config.getMetadataConfig(), 
Lazy.eagerly(Option.of(writeSchemaWithMetaFields)),
-              Option.of(this.recordMerger.getRecordType())).keySet());
+              Option.of(this.recordMerger.getRecordType()), 
indexVersion).keySet());

Review Comment:
   Could `HoodieTableMetadataUtil#getColumnsToIndex` take 
hoodieTable.getMetaClient() and figure out the index version within the method 
`HoodieTableMetadataUtil#getColumnsToIndex`?  Similar for 
`collectColumnRangeMetadata` so that the logic of fetching index version is not 
present in `HoodieAppendHandle`.



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