-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Enable rewriting certain inner joins as filters. #11068
Merged
Merged
Commits on Apr 5, 2021
-
Enable rewriting certain inner joins as filters.
The main logic for doing the rewrite is in JoinableFactoryWrapper's segmentMapFn method. The requirements are: - It must be an inner equi-join. - The right-hand columns referenced by the condition must not contain any duplicate values. (If they did, the inner join would not be guaranteed to return at most one row for each left-hand-side row.) - No columns from the right-hand side can be used by anything other than the join condition itself. HashJoinSegmentStorageAdapter is also modified to pass through to the base adapter (even allowing vectorization!) in the case where 100% of join clauses could be rewritten as filters. In support of this goal: - Add Query getRequiredColumns() method to help us figure out whether the right-hand side of a join datasource is being used or not. - Add JoinConditionAnalysis getRequiredColumns() method to help us figure out if the right-hand side of a join is being used by later join clauses acting on the same base. - Add Joinable getNonNullColumnValuesIfAllUnique method to enable retrieving the set of values that will form the "in" filter. - Add LookupExtractor canGetKeySet() and keySet() methods to support LookupJoinable in its efforts to implement the new Joinable method. - Add "enableRewriteJoinToFilter" feature flag to JoinFilterRewriteConfig. The default is disabled.
Configuration menu - View commit details
-
Copy full SHA for 156878e - Browse repository at this point
Copy the full SHA 156878eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64508f3 - Browse repository at this point
Copy the full SHA 64508f3View commit details
Commits on Apr 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c7710b1 - Browse repository at this point
Copy the full SHA c7710b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 620129a - Browse repository at this point
Copy the full SHA 620129aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62f88b7 - Browse repository at this point
Copy the full SHA 62f88b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32ea480 - Browse repository at this point
Copy the full SHA 32ea480View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4feee8 - Browse repository at this point
Copy the full SHA c4feee8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c262a24 - Browse repository at this point
Copy the full SHA c262a24View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7c06bf - Browse repository at this point
Copy the full SHA e7c06bfView commit details
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.