Refactor AggregationNode creation#12101
Merged
sopel39 merged 4 commits intotrinodb:masterfrom May 27, 2022
Merged
Conversation
071b30f to
a676ced
Compare
Member
Author
|
The only CI failure is a flaky test #11275 |
a676ced to
682c0a9
Compare
Member
Author
|
replaced |
sopel39
reviewed
May 23, 2022
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
682c0a9 to
50fa940
Compare
lukasz-stec
commented
May 24, 2022
Member
Author
lukasz-stec
left a comment
There was a problem hiding this comment.
comments addressed
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNodeBuilder.java
Outdated
Show resolved
Hide resolved
sopel39
reviewed
May 24, 2022
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
50fa940 to
2f170a8
Compare
lukasz-stec
commented
May 24, 2022
Member
Author
lukasz-stec
left a comment
There was a problem hiding this comment.
comments addressed
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Outdated
Show resolved
Hide resolved
c8c9683 to
2f3cffb
Compare
sopel39
approved these changes
May 26, 2022
core/trino-main/src/main/java/io/trino/sql/planner/LogicalPlanner.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/QueryPlanner.java
Outdated
Show resolved
Hide resolved
Member
|
small comment |
2f3cffb to
2602172
Compare
Member
Author
|
replaced |
AggregationNode is created in multiple places base on existing AggregationNode with some fields changed. AggregationNode.Builder makes that semantics explicit plus it makes it easier to add new fields to AggregationNode.
2602172 to
494c8b8
Compare
sopel39
approved these changes
May 27, 2022
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
This is a refactoring that extracts multiple ways
AggregationNodeis being instantiated to helper methods +AggregationNodeBuilderwhen applicable.This reduces code duplication and makes it easier to understand the code intent.
Also, it makes it easier to modify
AggregationNodee.g. add new fields.refactoring
core query engine
Code refactoring
Related issues, pull requests, and links
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: