-
Notifications
You must be signed in to change notification settings - Fork 39
Fix reducing existences #551
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
Open
oerling
wants to merge
1
commit into
facebookincubator:main
Choose a base branch
from
oerling:fix-exists-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
When we import an already placed table or tables into a build side for cardinality reduction as a semijoin: - The colums on the right side of the semijoin must not be added to downstreamColumns. A semijoin (exists) or antijoin (not exists) does not produce columns, except maybe a mark. Also, if the join has filters, the columns in the filter that come from the right side are not downstream columns. - When a semijoin right side is a join, that join may itself contain existences. The right sides of these existences are not suitable for joining to the table or dt being reduced, since a semijoin right side does not produce columns. So, do not consider these for joining the reducing existence to the thing being reduced.
MBkkt
reviewed
Oct 23, 2025
| compositeEdge = JoinEdge::makeInner(nullptr, joined); | ||
| if (joined == join->rightTable()) { | ||
| for (auto i = 0; i < join->numKeys(); ++i) { | ||
| compositeEdge->addEquality( |
Collaborator
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.
Can we check we don't make edges with a lot of duplicates?
When I run tpch q9 I noticed there was duplicates in join keys (in velox execution plan)
mbasmanova
added a commit
to mbasmanova/verax
that referenced
this pull request
Oct 24, 2025
Summary: Partial fix for facebookincubator#530 Adapted from Orri's facebookincubator#551 When we import an already placed table or tables into a build side for cardinality reduction as a semijoin: The colums on the right side of the semijoin must not be added to downstreamColumns. A semijoin (exists) or antijoin (not exists) does not produce columns, except maybe a mark. Also, if the join has filters, the columns in the filter that come from the right side are not downstream columns. Co-authored-by: oerling Differential Revision: D85464350
meta-codesync bot
pushed a commit
that referenced
this pull request
Oct 25, 2025
Summary: Pull Request resolved: #560 Partial fix for #530 Adapted from Orri's #551 When we import an already placed table or tables into a build side for cardinality reduction as a semijoin: The colums on the right side of the semijoin must not be added to downstreamColumns. A semijoin (exists) or antijoin (not exists) does not produce columns, except maybe a mark. Also, if the join has filters, the columns in the filter that come from the right side are not downstream columns. Reviewed By: xiaoxmeng Differential Revision: D85464350 fbshipit-source-id: 2d8503f51fbe87e551bf3413bd0d607b884681dc Co-authored-by: oerling
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.
When we import an already placed table or tables into a build side for cardinality reduction as a semijoin:
The colums on the right side of the semijoin must not be added to downstreamColumns. A semijoin (exists) or antijoin (not exists) does not produce columns, except maybe a mark. Also, if the join has filters, the columns in the filter that come from the right side are not downstream columns.
When a semijoin right side is a join, that join may itself contain existences. The right sides of these existences are not suitable for joining to the table or dt being reduced, since a semijoin right side does not produce columns. So, do not consider these for joining the reducing existence to the thing being reduced.
Fixes #530