lokeshj1703 commented on code in PR #7958:
URL: https://github.com/apache/hudi/pull/7958#discussion_r1109597042
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/execution/bulkinsert/TestBulkInsertInternalPartitionerForRows.java:
##########
@@ -172,9 +173,14 @@ private void
testBulkInsertInternalPartitioner(BulkInsertPartitioner partitioner
return;
}
Dataset<Row> actualRecords = (Dataset<Row>)
partitioner.repartitionRecords(rows, numPartitions);
- assertEquals(
- enforceNumOutputPartitions ? numPartitions :
rows.rdd().getNumPartitions(),
- actualRecords.rdd().getNumPartitions());
+ if (isGloballySorted) {
+ // For GLOBAL_SORT, `df.sort` may generate smaller number of partitions
than the specified parallelism
+ assertTrue(actualRecords.rdd().getNumPartitions() <= numPartitions);
Review Comment:
This is happening because Global Sort Bulk Insert partitioner is using
coalesce instead of repartition.
--
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]