silundong commented on PR #4267: URL: https://github.com/apache/calcite/pull/4267#issuecomment-2771210498
@asolimando Got it. Your concerns are also what I have considered. As the notes I described in jira, this rule must be guaranteed to be applied only once to avoid generating same redundant expression. A simple example is that it cannot be in the same rule set as `FilterJoinRule`. We need to apply this rule first and then `FilterJoinRule`. Of course, as you said, other rules may also interact with this rule and cause an infinite loop, especially additional expression simplification. I initially tried to perform disjunction expansion directly in `FilterJoinRule` to solve the [TODO](https://github.com/apache/calcite/blob/b394abca407eea06ee8f8b50f30bd443f286bb42/core/src/main/java/org/apache/calcite/rel/rules/FilterJoinRule.java#L105), but I encountered a similar problem. The simplification of the expression caused the `FilterJoinRule` rule to loop infinitely. So I think it is a better and safer solution to use a single rule for disjunction expansion before predicate pushdown. My original intention is also to try not to mix this rule with other rules, especially those related to expressions. You mean that this rule should not be in `CoreRules` now, and it can exist alone, right? -- 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]
