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 it 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
- canEvaluate(EqualTo(a,c), R)
returns false
- canEvaluate(Literal(1), R)
returns true
as literals CAN be evaluated on any plan
Returns true iff expr
could be evaluated as a condition within join.
Returns true iff expr
could be evaluated as a condition within join.
Normalize the exprIds in the given expression, by updating the exprId in AttributeReference
with its referenced ordinal from input attributes.
Normalize the exprIds in the given expression, by updating the exprId in AttributeReference
with its referenced ordinal from input attributes. It's similar to BindReferences
but we
do not use BindReferences
here as the plan may take the expression as a parameter with type
Attribute
, and replace it with BoundReference
will cause error.
Composes the given predicates into a conjunctive predicate, which is normalized and reordered.
Composes the given predicates into a conjunctive predicate, which is normalized and reordered. Then returns a new sequence of predicates by splitting the conjunctive predicate.