-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Similarly to #3708,
We programmatically create Exprs and would like to take advantage of the simplify + const evaluation code.
In IOx we have a SimplifyAdapter that does this https://github.com/influxdata/influxdb_iox/blob/alamb%2Fmass_upgrade/predicate/src/rpc_predicate.rs#L279 but it would be better to get this API more visible
Describe the solution you'd like
I think I would like a interface like:
/// Apply simplification and constant propagation to `expr`
/// for example `X + (1 + 3)` is rewritten to `X + 4`
pub fn simplify_expr(expr: Expr, schema: &DfSchema, props: &ExecutionProps) -> Result<Expr> {
...
}Describe alternatives you've considered
Can keep doing SimplifyAdapter type
Additional context
N/A
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request