Skip to content
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

Merged
merged 4 commits into from
May 27, 2022

Conversation

lukasz-stec
Copy link
Member

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.

Is this change a fix, improvement, new feature, refactoring, or other?

refactoring

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

core query engine

How would you describe this change to a non-technical end user or system administrator?

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:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Apr 22, 2022
@lukasz-stec lukasz-stec requested a review from sopel39 April 22, 2022 13:21
@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch 2 times, most recently from 071b30f to a676ced Compare April 23, 2022 17:37
@lukasz-stec
Copy link
Member Author

The only CI failure is a flaky test #11275

@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch from a676ced to 682c0a9 Compare April 25, 2022 07:51
@lukasz-stec
Copy link
Member Author

replaced AggregationNode#distinctAggregation with AggregationNode#restoreDistinctAggregation

@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch from 682c0a9 to 50fa940 Compare May 24, 2022 07:52
Copy link
Member Author

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments addressed

@lukasz-stec lukasz-stec requested a review from sopel39 May 24, 2022 07:52
Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments

@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch from 50fa940 to 2f170a8 Compare May 24, 2022 19:46
Copy link
Member Author

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments addressed

@lukasz-stec lukasz-stec requested a review from sopel39 May 24, 2022 19:46
@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch 2 times, most recently from c8c9683 to 2f3cffb Compare May 26, 2022 13:16
@sopel39
Copy link
Member

sopel39 commented May 26, 2022

small comment

@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch from 2f3cffb to 2602172 Compare May 26, 2022 14:58
@lukasz-stec
Copy link
Member Author

replaced AggregationNode.singleAggregation with static import + rebased on the master

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.
@lukasz-stec lukasz-stec force-pushed the ls/013-aggregation-node-builder branch from 2602172 to 494c8b8 Compare May 26, 2022 15:02
@sopel39 sopel39 merged commit a262611 into trinodb:master May 27, 2022
@github-actions github-actions bot added this to the 383 milestone May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants