codope commented on code in PR #12653:
URL: https://github.com/apache/hudi/pull/12653#discussion_r1927427047
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -2766,6 +2768,79 @@ private static void validatePayload(int type,
Map<String, HoodieMetadataFileInfo
}
}
+ public static Set<String>
getExpressionIndexPartitionsToInit(MetadataPartitionType partitionType,
HoodieMetadataConfig metadataConfig, HoodieTableMetaClient dataMetaClient) {
+ Set<String> expressionIndexPartitionsToInit =
getIndexPartitionsToInit(partitionType, dataMetaClient);
+ if (expressionIndexPartitionsToInit.isEmpty()) {
+ if (isNewExpressionIndexDefinitionRequired(metadataConfig,
dataMetaClient)) {
Review Comment:
i thought about it. The thing is if we create using sql, then index
definition will be present by the time we come to metadata writer
`initializeFromFileSystem`. But, when we create index through write configs,
that is the first time we will be updating index definition.
To make it more readable, I have renamed the method to
`getIndexPartitionsToInitBasedOnIndexDefinition` and added javadoc for the
method where it gets called.
--
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]