jayzhan211 opened a new issue, #10456: URL: https://github.com/apache/datafusion/issues/10456
### Is your feature request related to a problem or challenge? While deprecating`Expr::GetIndexedField`, I found there are many test cases that are not covered in sqllogictest, for example `test_inequalities_non_null_bounded`. Since we need to replace `field` API with `get_field`. We can only includes the test in `core` or sqllogictest. And, interestingly, I found that guarantee rewrite is not applied to SQL workflow. ``` statement ok create table t (c int) as values (1), (3), (5); query TT explain select struct(c) from t where c between 3 and 1; ---- logical_plan 01)Projection: struct(t.c) 02)--Filter: t.c >= Int32(3) AND t.c <= Int32(1) 03)----TableScan: t projection=[c] physical_plan 01)ProjectionExec: expr=[struct(c@0) as struct(t.c)] 02)--RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1 03)----CoalesceBatchesExec: target_batch_size=8192 04)------FilterExec: c@0 >= 3 AND c@0 <= 1 05)--------MemoryExec: partitions=1, partition_sizes=[1] statement ok drop table t; ``` I expect that `FilterExec` should be removed or converted to something like `True`, since the condition here is always false. ### Describe the solution you'd like Apply `guarantee_rewriter` to sql workflow. If the simplification logic can be included in `Simplifier` is a plus. ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org