FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-470: ListViewVector#getElementEndIndex should returns size not index by joyCurry30 · Pull Request #554 · apache/arrow-java · GitHub

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

Open
joyCurry30 wants to merge 2 commits into
apache:mainfrom
joyCurry30:GH-470
Open

GH-470: ListViewVector#getElementEndIndex should returns size not index#554
joyCurry30 wants to merge 2 commits into
apache:mainfrom
joyCurry30:GH-470

Conversation

Copy link
Copy Markdown

Close #470

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 changed the title GH-470: ListViewVector#getElementEndIndex should returns size not index. GH-470: ListViewVector#getElementEndIndex should returns size not index Jan 23, 2025
@Override
public int getElementEndIndex(int index) {
return sizeBuffer.getInt(index * OFFSET_WIDTH);
return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should line 954 be changed together? BTW, are these methods covered by any unit test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

To answer my 1st question: no.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't see any unit tests for it; and if possible would be worth a small one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good suggest. I will add UT for it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Shouldn't the end index be offset + size + 1? (Assuming noninclusive)

Copy link
Copy Markdown
Contributor

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

This comment has been minimized.

joyCurry30 commented Mar 11, 2025
edited
Loading

Copy link
Copy Markdown
Author

I am sorry for silence for so long. I have just add the ut for ListViewVector#getElementEndIndex. Could you please take a look when you are free? I'd be happy to address any feedback or make further improvement if needed. @nbauernfeind @wgtmac

lidavidm added the bug-fix PRs that fix a big. label Mar 11, 2025
github-actions Bot added this to the 18.3.0 milestone Mar 11, 2025
jbonofre removed this from the 18.3.0 milestone May 8, 2025
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

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListViewVector#getElementEndIndex Returns Size not Index

5 participants


Back | FazBrowse Home | New Git URL