ARROW-6200: [Java] Method getBufferSizeFor in BaseRepeatedValueVector/ListVector not correct#5060
Closed
tianchen92 wants to merge 2 commits into
Closed
ARROW-6200: [Java] Method getBufferSizeFor in BaseRepeatedValueVector/ListVector not correct#5060tianchen92 wants to merge 2 commits into
tianchen92 wants to merge 2 commits into
Conversation
…/ListVector not correct
Codecov Report
@@ Coverage Diff @@
## master #5060 +/- ##
==========================================
+ Coverage 88.58% 89.71% +1.13%
==========================================
Files 805 670 -135
Lines 94407 99383 +4976
Branches 1418 0 -1418
==========================================
+ Hits 83627 89158 +5531
+ Misses 10418 10225 -193
+ Partials 362 0 -362Continue to review full report at Codecov.
|
pravindra
reviewed
Aug 12, 2019
| if (valueCount == 0) { | ||
| return 0; | ||
| } | ||
| final int offsetBufferSize = (valueCount + 1) * OFFSET_WIDTH; |
Contributor
There was a problem hiding this comment.
reuse code from parent ?
return super.getBufferSizeFor(valueCount) + validityBufferSize;
Contributor
Author
There was a problem hiding this comment.
Right, fixed. Thanks
pravindra
approved these changes
Aug 12, 2019
Contributor
|
thanks @liyafan82 for the change. |
pribor
pushed a commit
to GlobalWebIndex/arrow
that referenced
this pull request
Oct 24, 2025
…/ListVector not correct
Related to ARROW-6200.
>Currently, getBufferSizeFor in BaseRepeatedValueVector implemented as below:
if (valueCount == 0) {
return 0;
}
return ((valueCount + 1) * OFFSET_WIDTH) + vector.getBufferSizeFor(valueCount);
Here vector.getBufferSizeFor(valueCount) seems not right which should be
>int innerVectorValueCount = offsetBuffer.getInt(valueCount * OFFSET_WIDTH);
vector.getBufferSizeFor(innerVectorValueCount)
ListVector has the same problem.
Closes apache#5060 from tianchen92/ARROW-6200 and squashes the following commits:
f0bdbfb <tianchen> reuse code
90900e7 <tianchen> ARROW-6200: Method getBufferSizeFor in BaseRepeatedValueVector/ListVector not correct
Authored-by: tianchen <niki.lj@alibaba-inc.com>
Signed-off-by: Pindikura Ravindra <ravindra@dremio.com>
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.
Related to ARROW-6200.
Here vector.getBufferSizeFor(valueCount) seems not right which should be
ListVector has the same problem.