Planner rule that matches a
Filter expression with correlated variables, and rewrites the
condition in a simpler form that is more convenient for the decorrelation logic.
Uncorrelated calls below a comparison operator are turned into input references by extracting the
computation in a
Project expression. An additional projection
may be added on top of the new filter to retain expression equivalence.
Sub-plan before
LogicalProject($f0=[true])
LogicalFilter(condition=[=($cor0.DEPTNO, +($7, 30))])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
Sub-plan after
LogicalProject($f0=[true])
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2],..., COMM=[$6], DEPTNO=[$7], SLACKER=[$8])
LogicalFilter(condition=[=($cor0.DEPTNO, $9)])
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2],..., SLACKER=[$8], $f9=[+($7, 30)])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])