pub fn simplify_const_expr(
expr: Arc<dyn PhysicalExpr>,
) -> Result<Transformed<Arc<dyn PhysicalExpr>>>๐Deprecated since 53.0.0:
This function will be removed in a future release in favor of a private implementation that depends on other implementation details. Please open an issue if you have a use case for keeping it.
Expand description
Simplify expressions that consist only of literals by evaluating them.
This function checks if all children of the given expression are literals. If so, it evaluates the expression against a dummy RecordBatch and returns the result as a new Literal.
ยงExample transformations
1 + 2->3(1 + 2) * 3->9(with bottom-up traversal)'hello' || ' world'->'hello world'