Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CALCITE-6432] Infinite loop for JoinPushTransitivePredicatesRule #3819

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asdfgh19
Copy link

@asdfgh19 asdfgh19 commented Jun 9, 2024

jira: CALCITE-6432

Infinite loop for JoinPushTransitivePredicatesRule when there are multiple project expressions reference the same input field.

…tiple project expressions reference the same input field
@mihaibudiu
Copy link
Contributor

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
Copy link
Contributor

what is the status of this PR?

@asdfgh19
Copy link
Author

asdfgh19 commented Sep 6, 2024

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

@mihaibudiu
Copy link
Contributor

This looks like a useful PR, can we make it work?
Can you please fix the conflicts first?

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants