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


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/execution/bulkinsert/RDDBucketIndexPartitioner.java:
##########
@@ -121,7 +122,10 @@ private JavaRDD<HoodieRecord<T>> 
doPartitionAndSortByRecordKey(JavaRDD<HoodieRec
       LOG.warn("Bucket index does not support global sort mode, the sort will 
only be done within each data partition");
     }
 
-    Comparator<HoodieKey> comparator = (Comparator<HoodieKey> & Serializable) 
(t1, t2) -> t1.getRecordKey().compareTo(t2.getRecordKey());
+    boolean lsmTable = 
table.getMetaClient().getTableConfig().isLSMTreeStorageLayout();

Review Comment:
   🤖 nit: since this is a boolean, could you prefix it with `is` — `isLsmTable` 
— so it reads as a predicate consistently with the rest of the codebase?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/commit/BaseDatasetBulkInsertCommitActionExecutor.java:
##########
@@ -140,8 +141,11 @@ public String getCommitActionType() {
   protected BulkInsertPartitioner<Dataset<Row>> getPartitioner(boolean 
populateMetaFields, boolean isTablePartitioned) {
     if (populateMetaFields) {
       if (writeConfig.getIndexType() == HoodieIndex.IndexType.BUCKET) {
+        BucketSortBulkInsertPartitioner.validateCustomSortColumns(table, null);

Review Comment:
   🤖 nit: passing `null` explicitly here is a bit surprising — the method has a 
`sortString` parameter, but at this call site there's no sort string at all. 
Would an overload `validateCustomSortColumns(HoodieTable table)` (delegating to 
the existing one with `null`) make the intent clearer?
   
   <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