-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Refactor AggregationNode creation #12101
Refactor AggregationNode creation #12101
Conversation
071b30f
to
a676ced
Compare
The only CI failure is a flaky test #11275 |
a676ced
to
682c0a9
Compare
replaced |
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
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
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Show resolved
Hide resolved
...ain/src/main/java/io/trino/sql/planner/iterative/rule/PushPartialAggregationThroughJoin.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/optimizations/PredicatePushDown.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/plan/AggregationNode.java
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/AggregationDecorrelation.java
Show resolved
Hide resolved
c8c9683
to
2f3cffb
Compare
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
small comment |
2f3cffb
to
2602172
Compare
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
Description
This is a refactoring that extracts multiple ways
AggregationNode
is being instantiated to helper methods +AggregationNodeBuilder
when applicable.This reduces code duplication and makes it easier to understand the code intent.
Also, it makes it easier to modify
AggregationNode
e.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: