xushiyan commented on code in PR #8741:
URL: https://github.com/apache/hudi/pull/8741#discussion_r1197327001
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/execution/bulkinsert/TestBulkInsertInternalPartitionerForRows.java:
##########
@@ -116,36 +115,24 @@ public void
testBulkInsertInternalPartitioner(BulkInsertSortMode sortMode,
testBulkInsertInternalPartitioner(
BulkInsertInternalPartitionerWithRowsFactory.get(config,
isTablePartitioned, enforceNumOutputPartitions),
- records1,
+ records,
enforceNumOutputPartitions,
isGloballySorted,
isLocallySorted,
- generateExpectedPartitionNumRecords(records1),
- Option.empty(),
- populateMetaFields);
- testBulkInsertInternalPartitioner(
- BulkInsertInternalPartitionerWithRowsFactory.get(config,
isTablePartitioned, enforceNumOutputPartitions),
- records2,
- enforceNumOutputPartitions,
- isGloballySorted,
- isLocallySorted,
- generateExpectedPartitionNumRecords(records2),
+ generateExpectedPartitionNumRecords(records),
Option.empty(),
populateMetaFields);
}
@Test
public void testCustomColumnSortPartitionerWithRows() {
- Dataset<Row> records1 = generateTestRecords();
- Dataset<Row> records2 = generateTestRecords();
- String sortColumnString = records1.columns()[5];
+ Dataset<Row> records = generateTestRecords();
+ String sortColumnString = records.columns()[5];
String[] sortColumns = sortColumnString.split(",");
Comparator<Row> comparator = getCustomColumnComparator(sortColumns);
testBulkInsertInternalPartitioner(new
RowCustomColumnsSortPartitioner(sortColumns),
- records1, true, false, true,
generateExpectedPartitionNumRecords(records1), Option.of(comparator), true);
- testBulkInsertInternalPartitioner(new
RowCustomColumnsSortPartitioner(sortColumns),
- records2, true, false, true,
generateExpectedPartitionNumRecords(records2), Option.of(comparator), true);
+ records, true, true, true,
generateExpectedPartitionNumRecords(records), Option.of(comparator), true);
Review Comment:
the existing test treated the partitioner as non-global and hence failed the
test scenario under spark 3.2
--
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]