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

Minor: remove duplication in Min/Max accumulator #6960

Merged
merged 2 commits into from
Jul 14, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 13, 2023

Which issue does this PR close?

related to

Rationale for this change

While working on #6957 to provide a default starting value, I realized this could be used to consolidate the Min/Max accumulator implementation as well to avoid duplication

What changes are included in this PR?

Change min/max to use the standard PrimitiveGroupsAccumulator rather than implementing itself

Are these changes tested?

Existing coverage

Are there any user-facing changes?

No, this is just less code

@github-actions github-actions bot added the physical-expr Physical Expressions label Jul 13, 2023
},
)
// Initialize each accumulator to $NATIVE::MIN
.with_starting_value($NATIVE::MIN),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Min/max need to start with some value other than zero

@alamb
Copy link
Contributor Author

alamb commented Jul 13, 2023

FYI @Dandandan

@alamb alamb marked this pull request as ready for review July 13, 2023 19:09
@alamb alamb merged commit 5991ae3 into apache:main Jul 14, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants