hudi-agent commented on code in PR #18842:
URL: https://github.com/apache/hudi/pull/18842#discussion_r3302242640
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieIndexConfig.java:
##########
@@ -777,10 +778,8 @@ private void validateBucketIndexConfig() {
hoodieIndexConfig.setValue(BUCKET_INDEX_HASH_FIELD,
hoodieIndexConfig.getString(KeyGeneratorOptions.RECORDKEY_FIELD_NAME));
} else {
- boolean valid = Arrays
-
.stream(hoodieIndexConfig.getString(KeyGeneratorOptions.RECORDKEY_FIELD_NAME).split(","))
- .collect(Collectors.toSet())
-
.containsAll(Arrays.asList(hoodieIndexConfig.getString(BUCKET_INDEX_HASH_FIELD).split(",")));
+ List<String> recordKeyFields =
KeyGenUtils.getRecordKeyFields(hoodieIndexConfig.getString(KeyGeneratorOptions.RECORDKEY_FIELD_NAME));
+ boolean valid =
recordKeyFields.containsAll(Arrays.asList(hoodieIndexConfig.getString(BUCKET_INDEX_HASH_FIELD).split(",")));
Review Comment:
🤖 nit: the hash field is still split with a raw `.split(",")` here while the
record key now goes through `getRecordKeyFields()` — could you apply the same
helper to `BUCKET_INDEX_HASH_FIELD` so both sides get consistent
trimming/empty-field filtering?
<sub><i>- AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]