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

Decorrelation should get rid of correlated predicates while decorrelation filter condition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      For queries such as

      select sal from emp
      where empno IN (
        select deptno from dept
        where emp.job = dept.name)
      

      Filter condition for correlated predicate e.g. =($cor0.JOB, $1) is transformed into equality predicate on same column e.g. $1=$1 after calling decorrelateExpr (if value generator is not generated). This is further simplified into $1 is not null.
      We do not need to generate and simplify such predicate expression, instead it could be completely removed. This will help support cases other than equality correlated predicates for which value generated is not required.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vgarg Vineet Garg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: