yanlin-Lynn commented on a change in pull request #1616: [CALCITE-3535]
EnumerableJoinRule: remove unnecessary Filter on top of INNER Join
URL: https://github.com/apache/calcite/pull/1616#discussion_r355401334
##########
File path: core/src/test/java/org/apache/calcite/test/JdbcTest.java
##########
@@ -2703,12 +2703,11 @@ private void
checkNullableTimestamp(CalciteAssert.Config config) {
.query("select empno, desc from sales.emps,\n"
+ " (SELECT * FROM (VALUES (10, 'SameName')) AS t (id, desc)) as
sn\n"
+ "where emps.deptno = sn.id and sn.desc = 'SameName' group by
empno, desc")
- .explainContains("EnumerableCalc(expr#0..1=[{inputs}], EMPNO=[$t1],
DESC=[$t0])\n"
- + " EnumerableAggregate(group=[{1, 2}])\n"
- + " EnumerableCalc(expr#0..3=[{inputs}],
expr#4=[CAST($t3):INTEGER NOT NULL], expr#5=[=($t4, $t0)], expr#6=['SameName'],
expr#7=[=($t1, $t6)], expr#8=[AND($t5, $t7)], proj#0..3=[{exprs}],
$condition=[$t8])\n"
- + " EnumerableHashJoin(condition=[true], joinType=[inner])\n"
- + " EnumerableValues(tuples=[[{ 10, 'SameName' }]])\n"
- + " EnumerableTableScan(table=[[SALES, EMPS]])\n")
+ .explainContains("EnumerableAggregate(group=[{0, 3}])\n"
+ + " EnumerableNestedLoopJoin(condition=[=(CAST($1):INTEGER NOT
NULL, $2)], joinType=[inner])\n"
Review comment:
just curious , why `=(CAST($1):INTEGER NOT NULL, $2)` not an equal join ?
----------------------------------------------------------------
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