danny0405 commented on code in PR #18187:
URL: https://github.com/apache/hudi/pull/18187#discussion_r2807145767
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1417,9 +1418,7 @@ public void
validateAgainstTableProperties(HoodieTableConfig tableConfig, Hoodie
if (StringUtils.isNullOrEmpty(keyGenClass)) {
keyGenClass = "org.apache.hudi.keygen.SimpleKeyGenerator";
}
- if (!keyGenClass.equals("org.apache.hudi.keygen.SimpleKeyGenerator")
- &&
!keyGenClass.equals("org.apache.hudi.keygen.NonpartitionedKeyGenerator")
- &&
!keyGenClass.equals("org.apache.hudi.keygen.ComplexKeyGenerator")) {
+ if
(!NO_METAFIELDS_KEYGEN_ALLOWLIST.contains(KeyGeneratorType.fromClassName(keyGenClass)))
{
Review Comment:
we can even define a static method in `KeyGeneratorType` with a meaningful
name, then make the `NO_METAFIELDS_KEYGEN_ALLOWLIST` private.
--
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]