Expr simplifier doesn't simplify exprs that are same if you swap lhs with rhs regardless of cycles #14943
Labels
bug
Something isn't working
help wanted
Extra attention is needed
performance
Make DataFusion faster
Describe the bug
I was doing some improvements to merge in delta-rs to add an expr simplifier on our early pruning filter. While doing this I noticed that these type of expressions:
s.foo = 'a' and 'a' = s.foo
are not getting simplified intos.foo='a'
directly but rather ins.foo='a' and s.foo='a'
even when you set max cycles to ludicrous number of 100.If the lhs and rhs can be swapped and then it's equal to an existing expression, it should be removed in one cicle.
See one of our logs after using the simplifier:
Before simplifying
After simplifying once with max cycles 100
To Reproduce
This is the starting expression.
Expected behavior
Simplify further
Additional context
No response
The text was updated successfully, but these errors were encountered: