hudi-agent commented on code in PR #18842:
URL: https://github.com/apache/hudi/pull/18842#discussion_r3345372969


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -182,7 +180,7 @@ public static String[] getBucketIndexKeys(Configuration 
conf) {
     if (StringUtils.isNullOrEmpty(indexKeyStr)) {
       return new String[]{};
     }
-    return indexKeyStr.split(",");
+    return StringUtils.split(indexKeyStr, ",").toArray(new String[0]);

Review Comment:
   🤖 nit: `getRecordKeys` just above was updated to delegate to 
`KeyGenUtils.getRecordKeyFields` (which handles null/empty internally), but 
`getBucketIndexKeys` still keeps an explicit null guard and calls 
`StringUtils.split` directly. Could you align them — either using 
`KeyGenUtils.getRecordKeyFields` here too, or leaving a brief comment 
explaining why bucket-key parsing intentionally diverges from record-key 
parsing?
   
   <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]

Reply via email to