godfrey he created CALCITE-2103:
-----------------------------------
Summary: error logical plan when size of In-list connected with OR
exceeds inSubQueryThreshold
Key: CALCITE-2103
URL: https://issues.apache.org/jira/browse/CALCITE-2103
Project: Calcite
Issue Type: Bug
Reporter: godfrey he
Assignee: Julian Hyde
{code:borderStyle=solid}
inSubQueryThreshold = 3
{code}
SQL:
{code:borderStyle=solid}
SELECT * FROM emp AS e WHERE e.empno in (130, 131, 132, 133, 134) OR e.ename in
('a', 'b', 'c', 'd', 'e')
{code}
logical plan:
{code:borderStyle=solid}
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' }]])
{code}
the logical plan is wrong.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)