-
Notifications
You must be signed in to change notification settings - Fork 4.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
HIVE-28572: Support Distribute by and Cluster by clauses in CBO #5505
Open
kasakrisz
wants to merge
23
commits into
apache:master
Choose a base branch
from
kasakrisz:HIVE-28572-master-cbo-distribute-by
base: master
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
HIVE-28572: Support Distribute by and Cluster by clauses in CBO #5505
kasakrisz
wants to merge
23
commits into
apache:master
from
kasakrisz:HIVE-28572-master-cbo-distribute-by
Conversation
This file contains 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
kasakrisz
force-pushed
the
HIVE-28572-master-cbo-distribute-by
branch
from
October 16, 2024 13:11
99042b8
to
8be8d5a
Compare
asf-ci-hive
added
tests pending
tests unstable
and removed
tests unstable
tests pending
labels
Oct 16, 2024
…t contain necessary expression
kasakrisz
force-pushed
the
HIVE-28572-master-cbo-distribute-by
branch
from
October 17, 2024 15:23
248b014
to
d38310b
Compare
asf-ci-hive
added
tests failed
tests pending
tests passed
and removed
tests pending
tests failed
labels
Oct 17, 2024
kasakrisz
force-pushed
the
HIVE-28572-master-cbo-distribute-by
branch
from
October 18, 2024 07:29
d38310b
to
fa959f2
Compare
Quality Gate passedIssues Measures |
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.
What changes were proposed in this pull request?
Currently CBO is disabled when a query has
DISTRIBUTE BY
orCLUSTER BY
clauses. This patch lift this limitation by implementing the support of these clauses.DISTRIBUTE BY key0..keyn
-> HiveSortExchange(distribution=[hash[key0...keyn]], collation=[[]])DISTRIBUTE BY key0..keyn SORT BY sortKey0...sortKeyn
-> HiveSortExchange(distribution=[hash[key0...keyn]], collation=[[sortKey0...sortKeyn]])CLUSTER BY key0..keyn
-> HiveSortExchange(distribution=[hash[key0...keyn]], collation=[[key0...keyn]])Hence CBO remains enabled
HiveSortExchange
is converted back toReduceSinkDesc
.HiveFilterSortTransposeRule
to enable pushing throughFilter
onSortExchange
Project
when it does not project necessary expressions referenced by distribution keys inSortExchange
Why are the changes needed?
CBO provides many optimizations at the logical level. Queries having
DISTRIBUTE BY
orCLUSTER BY
clauses can also benefit from these.Does this PR introduce any user-facing change?
No but execution plan may have changes.
Is the change a dependency upgrade?
No.
How was this patch tested?