[CALCITE-6432] Infinite loop for JoinPushTransitivePredicatesRule
jira: CALCITE-6432
Infinite loop for JoinPushTransitivePredicatesRule when there are multiple project expressions reference the same input field.
Due to reformatting github shows the changes as being much larger than they are. Is there a way to make this PR easier to review by preserving the original formatting? Also, some comments would be nice, the code changes are quite subtle.
what is the status of this PR?
Due to reformatting github shows the changes as being much larger than they are. Is there a way to make this PR easier to review by preserving the original formatting? Also, some comments would be nice, the code changes are quite subtle.
@mihaibudiu Thank you for your reply and suggestions.
In the original implementation, there is a class ExprsItr, which is used to find all possible predicates based on the Join condition, but it was originally an inner class of JoinConditionBasedPredicateInference; in order to reuse ExprsItr to find all possible situations for Project, I moved ExprsItr to the outside and made it static.
For example, the left input of Join has a predicate $0 + $1 > 10, and the Join condition is $0 = $7 and $1 = $8, ExprsItr can find all possibilities ($0 + $1 > 10, $0 + $8 > 10, $7 + $1 > 10, $7 + $8 > 10); Project is similar, for example, Project expr $0 and $7 both refer to the same input so $0 =$7
This looks like a useful PR, can we make it work? Can you please fix the conflicts first?
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.
Closing in favor of https://github.com/apache/calcite/pull/4346