You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vineet Garg (JIRA)" <ji...@apache.org> on 2017/06/20 00:50:00 UTC

[jira] [Created] (CALCITE-1851) Decorrelation should get rid of correlated predicates while decorrelation filter condition

Vineet Garg created CALCITE-1851:
------------------------------------

             Summary: Decorrelation should get rid of correlated predicates while decorrelation filter condition
                 Key: CALCITE-1851
                 URL: https://issues.apache.org/jira/browse/CALCITE-1851
             Project: Calcite
          Issue Type: Improvement
          Components: core
            Reporter: Vineet Garg
            Assignee: Julian Hyde


For queries such as
{code:sql}
select sal from emp
where empno IN (
  select deptno from dept
  where emp.job = dept.name)
{code}
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. e.g.
{code:sql}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)