Zouxxyy commented on code in PR #7468:
URL: https://github.com/apache/hudi/pull/7468#discussion_r1050721238
##########
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:
@boneanxs `repartitionByRange` will not trigger sort, is there an API doing
both sort and repartition with df? Now, I just implement it like
`GlobalSortPartitionerWithRows` does
--
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]