Minor: avoid a few clones in sum accumulator setup - #24309
Merged
Conversation
alamb
commented
Aug 12, 2026
| Self { | ||
| values: GenericDistinctBuffer::new(data_type.clone()), | ||
| data_type: data_type.clone(), | ||
| data_type, |
Contributor
Author
There was a problem hiding this comment.
this is one clone removed
| } else { | ||
| macro_rules! helper { | ||
| ($t:ty, $dt:expr) => { | ||
| Ok(Box::new(SumAccumulator::<$t>::new($dt.clone()))) |
Contributor
Author
There was a problem hiding this comment.
this is the second clone removed
alamb
marked this pull request as ready for review
August 12, 2026 21:25
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24309 +/- ##
==========================================
- Coverage 81.14% 81.14% -0.01%
==========================================
Files 1110 1110
Lines 386137 386137
Branches 386137 386137
==========================================
- Hits 313347 313339 -8
- Misses 54324 54330 +6
- Partials 18466 18468 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gabotechs
approved these changes
Aug 13, 2026
gabotechs
left a comment
Contributor
There was a problem hiding this comment.
👍 pretty simple, looks good
Contributor
|
LGTM 👍🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
This is a minor thing I found while doing some performance profiling for #24035
What changes are included in this PR?
Avoid a few clone calls
Are these changes tested?
By CI
Are there any user-facing changes?
realistically nothing that someone will measure