Add additional tests for PostgreSQL automatic JOIN pushdown#11703
Merged
findepi merged 4 commits intotrinodb:masterfrom Mar 31, 2022
Merged
Add additional tests for PostgreSQL automatic JOIN pushdown#11703findepi merged 4 commits intotrinodb:masterfrom
findepi merged 4 commits intotrinodb:masterfrom
Conversation
Co-authored-by: Ashhar Hasan <ashhar.hasan@starburstdata.com> Co-authored-by: Łukasz Osipiuk <lukasz@osipiuk.net> Co-authored-by: Jan Was <jan.was@starburstdata.com> Co-authored-by: Piotr Findeisen <piotr.findeisen@gmail.com>
d5585b7 to
db0b40a
Compare
Co-authored-by: Łukasz Osipiuk <lukasz@osipiuk.net>
ebyhr
approved these changes
Mar 29, 2022
losipiuk
approved these changes
Mar 29, 2022
Member
Author
|
cc @findinpath |
hashhar
approved these changes
Mar 29, 2022
wendigo
approved these changes
Mar 29, 2022
findinpath
reviewed
Mar 29, 2022
| // allowed join_to_tables ratio is 1.25 and join size is 54_000 which is less than (54_000 + 9_000) * 1.25 == 78_750 and is pushed down | ||
| assertThat(query(session, smallJoinOutputQuery)).isFullyPushedDown(); | ||
|
|
||
| // if we move threshold lower it will not be pushed down any more |
findinpath
reviewed
Mar 29, 2022
| "INNER JOIN tpch.tiny.orders o ON c.custkey = o.custkey"; | ||
|
|
||
| PlanMatchPattern joinWithoutFilter = | ||
| anyTree( |
Contributor
There was a problem hiding this comment.
newbie question: How should I read this plan?
customer & nation get joined and their outcome gets joined with orders?
I'd be happy to have a few comments explaining what triggers the reordering of the join operations.
Member
There was a problem hiding this comment.
For join re-ordering logic see ReorderJoins. This test however doesn't care how joins get re-ordered. It just cares that for a known-suboptimal order joins get reordered even if there's possibility of join pushdown. i.e. we shouldn't eagerly pushdown things because it's possible join re-ordering will lead to better plan overall.
findinpath
approved these changes
Mar 29, 2022
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.