public class ConstantPropagate
extends Transform
Implementation of one of the rule-based optimization steps. ConstantPropagate traverse the DAG
from root to child. For each conditional expression, process as follows:
1. Fold constant expression: if the expression is a UDF and all parameters are constant.
2. Shortcut expression: if the expression is a logical operator and it can be shortcut by
some constants of its parameters.
3. Propagate expression: if the expression is an assignment like column=constant, the expression
will be propagate to parents to see if further folding operation is possible.