-
-
Notifications
You must be signed in to change notification settings - Fork 238
moveJoinConditionsToFilter bug #1202
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
52fd405
moveJoinConditionsToFilter was moving a filter to every child of the …
max-hoffman 2f85e67
test for error condition
max-hoffman 030c1a6
Merge branch 'main' into max/moved-join-conditions-to-filter-bug
max-hoffman dcee7db
Merge branch 'main' into max/moved-join-conditions-to-filter-bug
max-hoffman 941344d
merge main
max-hoffman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this function run recursively up the tree, so each join node gets a turn to be the top node?
I'm curious how this interacts with pushdown, could use some more plan tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will always be one
topJoinin a single scope. You would need a subquery, union, etc to get a second scope. If we know the joins are all compact in the tree, we could probably have this whole rule just be a single transform. When we hit a node that isn't a join and thetopJoinis not nil we combine the conditions turned where filters. The relationship to pushdown is what you were telling me yesterday: this rule only moves filters from join to where clause, pushdown decides how low filters can be pushed.