danny0405 commented on code in PR #20122:
URL: https://github.com/apache/hudi/pull/20122#discussion_r4121128070
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1558,15 +1551,20 @@ protected void
ensureComplexKeyGenEncodingRecorded(HoodieTableMetaClient metaCli
}
/**
- * Pure validation: this method reads both configs and throws, and never
modifies either.
+ * Validates the write configuration against the table properties. For
writes that key records,
+ * ensures the complex key generator encoding is recorded; engines may
record a missing encoding.
*
* <p>Nothing reconciles the write config against the table beforehand. That
is deliberate: the mode
* is read further down the write path by handles and writer factories, some
of which hold no table
* config at all, so the write config has to be correct on its own rather
than corrected on the way
* in. This gate is what makes that true, by refusing writes whose
meta-field settings do not already
* agree with the table.
*/
- public void validateAgainstTableProperties(HoodieTableConfig tableConfig,
HoodieWriteConfig writeConfig) {
+ public void validateAgainstTableProperties(HoodieTableMetaClient metaClient,
HoodieWriteConfig writeConfig, WriteOperationType operationType) {
Review Comment:
I would not deem it as a user API, it's for internal validation purposes,
keeping one API makes the valition unified and easy to maintain.
--
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]