codope commented on code in PR #7958:
URL: https://github.com/apache/hudi/pull/7958#discussion_r1108713465


##########
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:
   would like to understand why this is the behavior. what's affecting the 
number of partitions? is it the size of data?



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