boneanxs commented on code in PR #7468:
URL: https://github.com/apache/hudi/pull/7468#discussion_r1050483022


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/execution/bulkinsert/RowCustomColumnsSortPartitioner.java:
##########
@@ -44,8 +44,8 @@ public RowCustomColumnsSortPartitioner(String[] columnNames) {
   @Override
   public Dataset<Row> repartitionRecords(Dataset<Row> records, int 
outputSparkPartitions) {
     final String[] sortColumns = this.sortColumnNames;
-    return records.coalesce(outputSparkPartitions)
-        .sortWithinPartitions(HoodieRecord.PARTITION_PATH_METADATA_FIELD, 
sortColumns);
+    return records.sort(HoodieRecord.PARTITION_PATH_METADATA_FIELD, 
sortColumns)

Review Comment:
   Good catch, here maybe we can use `repartitionByRange` to gain the same 
behavior with the `RDDCustomColumnsSortPartitioner`



-- 
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