ion-elgreco commented on issue #14987:
URL: https://github.com/apache/datafusion/issues/14987#issuecomment-2696634942
@jayzhan211 its using the expression simplifier:
```
let logical_filter = self.filter.map(|expr| {
// Simplify the expression first
let props = ExecutionProps::new();
let simplify_context =
SimplifyContext::new(&props).with_schema(df_schema.clone().into());
let simplifier =
ExprSimplifier::new(simplify_context).with_max_cycles(10);
let simplified = simplifier.simplify(expr).unwrap();
context
.create_physical_expr(simplified, &df_schema)
.unwrap()
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]