Returns true if expr
can be evaluated using only the output of plan
.
Returns true if expr
can be evaluated using only the output of plan
. This method
can be used to determine when is is acceptable to move expression evaluation within a query
plan.
For example consider a join between two relations R(a, b) and S(c, d).
canEvaluate(EqualTo(a,b), R)
returns true
where as canEvaluate(EqualTo(a,c), R)
returns
false
.
Collects projects and filters, in-lining/substituting aliases if necessary.
Collects projects and filters, in-lining/substituting aliases if necessary. Here are two examples for alias in-lining/substitution. Before:
SELECT c1 FROM (SELECT key AS c1 FROM t1) t2 WHERE c1 > 10 SELECT c1 AS c2 FROM (SELECT key AS c1 FROM t1) t2 WHERE c1 > 10
After:
SELECT key AS c1 FROM t1 WHERE key > 10 SELECT key AS c2 FROM t1 WHERE key > 10
A pattern that matches any number of project or filter operations on top of another relational operator. All filter operators are collected and their conditions are broken up and returned together with the top project operator. Aliases are in-lined/substituted if necessary.