Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
inSubQueryThreshold = 3
SQL:
SELECT * FROM emp AS e WHERE e.empno in (130, 131, 132, 133, 134) OR e.ename in ('a', 'b', 'c', 'd', 'e')
logical plan:
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8]) LogicalFilter(condition=[OR(true, true)]) LogicalJoin(condition=[=($1, $10)], joinType=[inner]) LogicalJoin(condition=[=($0, $9)], joinType=[inner]) LogicalTableScan(table=[[CATALOG, SALES, EMP]]) LogicalAggregate(group=[{0}]) LogicalValues(tuples=[[{ 130 }, { 131 }, { 132 }, { 133 }, { 134 }]]) LogicalAggregate(group=[{0}]) LogicalValues(tuples=[[{ 'a' }, { 'b' }, { 'c' }, { 'd' }, { 'e' }]])
the logical plan is wrong.
Attachments
Issue Links
- duplicates
-
CALCITE-2071 Query with IN and OR in WHERE clause returns wrong result
- Closed