-
Notifications
You must be signed in to change notification settings - Fork 24
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
GH-470: ListViewVector#getElementEndIndex should returns size not index #554
base: main
Are you sure you want to change the base?
Conversation
@@ -956,7 +956,7 @@ public int getElementStartIndex(int index) { | |||
|
|||
@Override | |||
public int getElementEndIndex(int index) { | |||
return sizeBuffer.getInt(index * OFFSET_WIDTH); | |||
return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should line 954 be changed together? BTW, are these methods covered by any unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer my 1st question: no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any unit tests for it; and if possible would be worth a small one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the fact that tests passed means nothing's covering it. Unfortunately the new types were only partially implemented before the contributor left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add a few basic assertions to testBasicListViewVector
https://github.com/apache/arrow-java/blob/main/vector/src/test/java/org/apache/arrow/vector/TestListViewVector.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggest. I will add UT for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@joyCurry30 Thank you so much for taking care of this! |
Close #470