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)

Reply via email to