Adjust BufferAggregator.get() impls to return copies#7464
Merged
gianm merged 3 commits intoapache:masterfrom Apr 13, 2019
Merged
Adjust BufferAggregator.get() impls to return copies#7464gianm merged 3 commits intoapache:masterfrom
gianm merged 3 commits intoapache:masterfrom
Conversation
Contributor
|
It seems like |
gianm
reviewed
Apr 12, 2019
| * <b>Implementations must not change the position, limit or mark of the given buffer</b> | ||
| * <b>Implementations must not change the position, limit or mark of the given buffer.</b> | ||
| * | ||
| * <b>The object returned must not have any references to the given buffer (i.e., make a copy).</b> |
Contributor
There was a problem hiding this comment.
I'd include rationale for this: it's because the object returned by get may live beyond the lifetime of the underlying buffer.
Contributor
Author
There was a problem hiding this comment.
Added the rationale here.
Contributor
Author
|
I updated this to use |
gianm
pushed a commit
to implydata/druid-public
that referenced
this pull request
Apr 14, 2019
* Adjust BufferAggregator.get() impls to return copies * Update BufferAggregator docs, more agg fixes * Update BufferAggregator get() doc
gianm
pushed a commit
to implydata/druid-public
that referenced
this pull request
Apr 14, 2019
* Adjust BufferAggregator.get() impls to return copies * Update BufferAggregator docs, more agg fixes * Update BufferAggregator get() doc
clintropolis
pushed a commit
that referenced
this pull request
Apr 24, 2019
* Adjust BufferAggregator.get() impls to return copies * Update BufferAggregator docs, more agg fixes * Update BufferAggregator get() doc
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.
Fixes #7461
This PR adjusts
HllSketchBuildBufferAggregator,DoublesSketchBuildBufferAggregator, andBaseBloomFilterBufferAggregatorto return on-heap copies of the aggregator's objects.