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

GH-470: ListViewVector#getElementEndIndex should returns size not index #554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joyCurry30
Copy link

Close #470

@kou kou changed the title [GH-470]ListViewVector#getElementEndIndex should returns size not index. GH-470: ListViewVector#getElementEndIndex should returns size not index. Jan 23, 2025
@kou kou changed the title GH-470: ListViewVector#getElementEndIndex should returns size not index. GH-470: ListViewVector#getElementEndIndex should returns size not index Jan 23, 2025
@@ -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);
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@nbauernfeind
Copy link
Contributor

@joyCurry30 Thank you so much for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListViewVector#getElementEndIndex Returns Size not Index
4 participants