Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2103

error logical plan when size of In-list connected with OR exceeds inSubQueryThreshold

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.16.0
    • 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

          Activity

            People

              julianhyde Julian Hyde
              godfreyhe godfrey he
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: