codope commented on code in PR #11597:
URL: https://github.com/apache/hudi/pull/11597#discussion_r1705606229


##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -99,18 +210,96 @@ public boolean 
isMetadataPartitionAvailable(HoodieTableMetaClient metaClient) {
       }
       return false;
     }
+
+    @Override
+    public void constructMetadataPayload(HoodieMetadataPayload payload, 
GenericRecord record) {
+      GenericRecord secondaryIndexRecord = getNestedFieldValue(record, 
SCHEMA_FIELD_ID_SECONDARY_INDEX);
+      checkState(secondaryIndexRecord != null, "Valid SecondaryIndexMetadata 
record expected for type: " + 
MetadataPartitionType.SECONDARY_INDEX.getRecordType());
+      payload.secondaryIndexMetadata = new HoodieSecondaryIndexInfo(
+          
secondaryIndexRecord.get(SECONDARY_INDEX_FIELD_RECORD_KEY).toString(),
+          (Boolean) 
secondaryIndexRecord.get(SECONDARY_INDEX_FIELD_IS_DELETED));
+    }
   },
-  PARTITION_STATS(HoodieTableMetadataUtil.PARTITION_NAME_PARTITION_STATS, 
"partition-stats-") {
+  PARTITION_STATS(HoodieTableMetadataUtil.PARTITION_NAME_PARTITION_STATS, 
"partition-stats-", 6) {

Review Comment:
   we reuse that for colstats.



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