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

Replace Aggregation RemoveInput manual WindowAggregation class #21349

Merged
merged 7 commits into from
Apr 17, 2024

Conversation

dain
Copy link
Member

@dain dain commented Apr 2, 2024

Description

Aggregation remove input is used solely for window functions. The replaces the @RemoveInput annotation and adds a WindowAggregation implementation. This can simplify the state required in a traditional aggregation since removal is now only allowed in a WindowAggregation implementation. Although both a remove method and the window aggregation could be supported at the same time, the extra complexity of both isn't worth it given how rarely the remove method is added.

Release notes

(X) Release notes are required, with the following suggested text:

# Section
* Annotate aggregation functions no longer support `@RemoveInput`.  Instead a `WindowAggregation` can be declared in `@AggregationFunction` and this supports input removal. ({issue}`issuenumber`)

Copy link
Member

Choose a reason for hiding this comment

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

Which warnings does fix? It's not very obvious from the diff.

Copy link
Member Author

Choose a reason for hiding this comment

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

The main point is these are mechanical suggestions from intellij. But the summary is:

  • class can be converted to a record is a warning
  • method can be private
  • method is unused
  • use Arrays.stream
  • Use List.getFirst

@dain dain merged commit 9c64a9c into trinodb:master Apr 17, 2024
99 checks passed
@dain dain deleted the window-agg branch April 17, 2024 22:57
@github-actions github-actions bot added this to the 446 milestone Apr 17, 2024
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.

None yet

2 participants