vlsi commented on a change in pull request #1699: [CALCITE-3637] Update linq4j
tests upgrade from junit4 to junit5
URL: https://github.com/apache/calcite/pull/1699#discussion_r361808514
##########
File path:
linq4j/src/test/java/org/apache/calcite/linq4j/test/JoinPreserveOrderTest.java
##########
@@ -141,81 +134,162 @@ public JoinPreserveOrderTest(
deptOrderColSelectors.get(j),
ascendingR,
nullsFirstR);
- data.add(params);
+ data.add(Arguments.of(params[0], params[1]));
}
}
}
}
}
}
- return data;
+ return data.stream();
}
- @Test public void testLeftJoinPreservesOrderOfLeftInput() {
+ private void initColumns(
+ FieldCollationDescription<Employee> leftColumn,
+ FieldCollationDescription<Department> rightColumn) {
+ this.leftColumn = leftColumn;
+ this.rightColumn = rightColumn;
+ }
+
+ @ParameterizedTest
+ @MethodSource("data")
+ void testLeftJoinPreservesOrderOfLeftInput(
+ FieldCollationDescription<Employee> leftColumn,
+ FieldCollationDescription<Department> rightColumn) {
+ initColumns(leftColumn, rightColumn);
testJoin(hashJoin(false, true), AssertOrder.PRESERVED,
AssertOrder.IGNORED);
}
- @Test public void testRightJoinPreservesOrderOfLeftInput() {
+ @ParameterizedTest
+ @MethodSource("data")
+ void testRightJoinPreservesOrderOfLeftInput(
+ FieldCollationDescription<Employee> leftColumn,
+ FieldCollationDescription<Department> rightColumn) {
+ initColumns(leftColumn, rightColumn);
Review comment:
I've renamed `FieldCollationDescription` to just `Field`, and it fits on a
single line now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services