pub fn fold_constants(expr: &Expr) -> ExprExpand description
Folds constant sub-expressions in a DataFusion [Expr] tree.
Handles:
- Arithmetic on literal pairs (
Literal op Literal) - Boolean identity rules (
true AND x→x,false OR x→x, etc.) - Recursive descent into
BinaryExpr,Notchildren
Returns a (possibly simplified) clone of the input expression.