nsivabalan commented on code in PR #12529:
URL: https://github.com/apache/hudi/pull/12529#discussion_r1901922474
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/BaseCommitActionExecutor.java:
##########
@@ -230,12 +233,25 @@ protected void commit(HoodieWriteMetadata<O> result,
List<HoodieWriteStat> write
serializeCommitMetadata(table.getMetaClient().getCommitMetadataSerDe(),
metadata));
LOG.info("Committed " + instantTime);
result.setCommitMetadata(Option.of(metadata));
+ // update cols to Index as applicable
+ HoodieColStatsIndexUtils.updateColsToIndex(table, config, metadata,
+ (Functions.Function2<HoodieTableMetaClient, List<String>, Void>)
(val1, val2) -> {
+ updateColumnsToIndexWithColStats(val1, val2);
+ return null;
+ });
} catch (IOException e) {
throw new HoodieCommitException("Failed to complete commit " +
config.getBasePath() + " at time " + instantTime,
e);
}
}
+ /**
+ * Updates the list of columns indexed with col stats index in Metadata
table.
+ * @param metaClient instance of {@link HoodieTableMetaClient} of interest.
+ * @param columnsToIndex list of columns to index.
+ */
+ protected abstract void
updateColumnsToIndexWithColStats(HoodieTableMetaClient metaClient, List<String>
columnsToIndex);
Review Comment:
https://issues.apache.org/jira/browse/HUDI-8801
we don't even have index definition concept in Flink. I would prefer to take
it up separately and expand the scope of this patch.
--
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]