Use stage input partitioning partitionCount instead of output partitioning#16052
Merged
raunaqmorarka merged 2 commits intotrinodb:masterfrom Feb 15, 2023
gaurav8297:fix_partition_count
Merged
Use stage input partitioning partitionCount instead of output partitioning#16052raunaqmorarka merged 2 commits intotrinodb:masterfrom gaurav8297:fix_partition_count
raunaqmorarka merged 2 commits intotrinodb:masterfrom
gaurav8297:fix_partition_count
Conversation
Contributor
There was a problem hiding this comment.
Some comments:
0. Very good change with renaming partitioningScheme -> outputPartitioningScheme.
- I would not add the new field
PlanFragment.partitionCount. We can just useoutputPartitioningScheme.partitionCount. What is meaning ofPlanFragment.partitionCount? I think you mean the number of input partition to the current stage. If yes, it could be taken from children, usingStageManager.getChidlren. It is more explicit way to reason about and less confusing. Then we have clear relationship between partitioning: I amHASHpartitioned stage and my children's output isHASHpartitioned so I can ask them about number of partitions, what do you think? - I would fire the rule
DeterminePartitionCountif we detect that there is no not-SystemPartitioningHandle. Otherwise, you can have a plan with emptypartitionCountand then adaptivehash-partition-countdoes not work.
radek-kondziolka
approved these changes
Feb 13, 2023
raunaqmorarka
approved these changes
Feb 14, 2023
core/trino-main/src/test/java/io/trino/sql/planner/iterative/rule/test/PlanBuilder.java
Outdated
Show resolved
Hide resolved
Contributor
|
What's about map PartitioningHandle and PartitionCount?
|
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.
Description
Instead of using output partitioning scheme's partitionCount, use the input partitionCount for selecting the number of nodes for that stage.
Additional context and related issues
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: