You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "rubenada (via GitHub)" <gi...@apache.org> on 2023/07/13 08:49:23 UTC
[GitHub] [calcite] rubenada commented on a diff in pull request #3311: [CALCITE-5732] EnumerableHashJoin and EnumerableMergeJoin on composite key return rows matching condition 'null = null'
rubenada commented on code in PR #3311:
URL: https://github.com/apache/calcite/pull/3311#discussion_r1262234007
##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableHashJoinTest.java:
##########
@@ -74,6 +74,25 @@ class EnumerableHashJoinTest {
"empid=110; name=Theodore; dept=Sales");
}
+ @Test void innerJoinWithCompositeKeyAndNullValues() {
+ tester(false, new HrSchema())
+ .query(
+ "select e1.empid from emps e1 join emps e2 "
+ + "on e1.deptno=e2.deptno and e1.commission=e2.commission")
+ .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner ->
+ planner.removeRule(EnumerableRules.ENUMERABLE_MERGE_JOIN_RULE))
+ .explainContains("EnumerableCalc(expr#0..4=[{inputs}], empid=[$t0])\n"
+ + " EnumerableHashJoin(condition=[AND(=($1, $3), =($2, $4))], joinType=[inner])\n"
Review Comment:
Good point. More tests added.
--
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: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org