Add flag in SQL to disable left base filter optimization for joins#10947
Merged
maytasm merged 7 commits intoapache:masterfrom Mar 9, 2021
Merged
Add flag in SQL to disable left base filter optimization for joins#10947maytasm merged 7 commits intoapache:masterfrom
maytasm merged 7 commits intoapache:masterfrom
Conversation
clintropolis
reviewed
Mar 9, 2021
| // This flag control whether a sql join query with left scan should be attempted to be run as direct table access | ||
| // instead of being wrapped inside a query. With direct table access enabled, druid can push down the join operation to | ||
| // data servers. | ||
| public static final String SQL_JOIN_LEFT_SCAN_DIRECT = "enableSQLLeftTableScanDirect"; |
Member
There was a problem hiding this comment.
this should maybe be enableJoinLeftTableScanDirect to be more consistent with other join related query context parameters. I also think it should probably be documented, but none of the other join query context parameters are documented (not sure why), so not sure its a blocker for this PR.
clintropolis
approved these changes
Mar 9, 2021
Contributor
Author
|
k8s integration test failed which is unrelated to changes in this PR. |
kgyrtkirk
added a commit
to kgyrtkirk/druid
that referenced
this pull request
Dec 11, 2023
Relates to apache#10947 Some note about disabling it was added [here](https://github.com/apache/druid/pull/10947/files#diff-39158f6b501cd2bcc925a57cbe8d07affbeaa683e33b3ec3f533cde8d8249094R62) > Please note that the flag could be applicable to queries even if there is no explicit join. since queries can internally translated into a join by the SQL planner.
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.
Follow up on #10697 where we added an optimization to push joins to historicals when left child is a scan with a filter. However, the change could actually underperform depending on the kind of query. This PR introduces a flag to switch between two behaviors. Default value of this flag is false.
Also fixed a bug pointed out by @gianm - https://github.com/apache/druid/pull/10697/files#r587924983