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

Remove unused update and merge implementations from Aggregates and supporting ScalarValue arithmetic #1550

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 11, 2022

Which issue does this PR close?

Re #1549

Rationale for this change

All of this code is unused but that is very unobvious

For aggregates, only update_batch and merge_batch are needed. The extra implementation in terms of ScalarValues is never called.

What changes are included in this PR?

  1. Remove the update and merge operations on Scalars
  2. Remove the arithmetic functions ScalarValue::sum, ScalarValue::div and ScalarValue::mul that were added in Add stddev and variance #1525
  3. PR removes the other implementations for Aggregates, and I will submit a follow on PR that changes the Accumulator trait (but will also be a backwards incompatible PR change so I want to have that discussion separately)

Are there any user-facing changes?

No

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Jan 11, 2022
@realno
Copy link
Contributor

realno commented Jan 11, 2022

Thank you @alamb for cleaning things up.

@Dandandan Dandandan merged commit 794b92b into apache:master Jan 13, 2022
@Dandandan
Copy link
Contributor

Nice cleanup! @alamb

@alamb alamb deleted the alamb/clean_up_merge branch January 13, 2022 14:00
@alamb alamb mentioned this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants