-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The plan used to (before #3841) be like
Which contains some duplicate exprs, see the file diff for highlights.
And in #3841 @Dandandan run some optimize rules one more time and got the duplicate exprs optimized out. But in #3861 the duplicate exprs will cause another problem when combine with CommonSubexpressionEliminate rule.
Describe the solution you'd like
Besides let other rules to do further optimization (this is useful to make more optimizations), I think it's also important to generate a "good enough" plan from a rule itself (i.e., remove duplications like this in FilterPushdown). So we can cut the dependent graph among individual plans (which is hard to maintain...).
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.