-
Notifications
You must be signed in to change notification settings - Fork 147
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
[PERF] Add physical plan optimizer and optimization #2557
Merged
Merged
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2557 +/- ##
==========================================
+ Coverage 63.27% 63.60% +0.32%
==========================================
Files 980 986 +6
Lines 109238 109848 +610
==========================================
+ Hits 69125 69865 +740
+ Misses 40113 39983 -130
|
universalmind303
approved these changes
Jul 31, 2024
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.
Adds a physical plan optimizer to go along with the logical plan optimizer.
Also adds an optimization that repartitions are now more lenient. Previously, if a table was partitioned on
col("a"), col("b")
, it would be considered distinct fromcol("b"), col("a")
and would run a repartition. Now, we walk down the plan tree and establish a canonical ordering of the columns, and when applicable we reorder columns in a repartition to conform to this. Then we remove redundant repartitions.Also, hash joins are now more lenient with the repartitioning. Consider the case where the left side is correctly partitioned with 20 partitions, but the right side is incorrectly partitioned (relative to the join) with 40 partitions. Previously, the partition count would always be set to the maximum, meaning both sides would be repartitioned to have 40 partitions. Now, the right side is the only side repartitioned, with the partition count is reduced to 20. There is a configurable limit on how much the partitions can be reduced.
Aims to fix #2280
Supersedes #2543