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

GH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) method by axreldable · Pull Request #1019 · apache/arrow-java · GitHub

GH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) method - #1019

Merged
jbonofre merged 2 commits into
apache:mainfrom
axreldable:gh-470-get-end-index-list-view-1
Feb 17, 2026
Merged

GH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) method#1019
jbonofre merged 2 commits into
apache:mainfrom
axreldable:gh-470-get-end-index-list-view-1

Conversation

Copy link
Copy Markdown
Contributor

What's Changed

First commit changes logic:

  • The PR fixes a bug in the ListViewVector.getElementEndIndex(index) method .

Before:

public int getElementEndIndex(int index) {
  return sizeBuffer.getInt(index * OFFSET_WIDTH);
}

After:

public int getElementEndIndex(int index) {
  return offsetBuffer.getInt(index * OFFSET_WIDTH) + sizeBuffer.getInt(index * SIZE_WIDTH);
}

Second commit doesn't change logic:

  • Fixes a bug of usage sizeBuffer with OFFSET_WIDTH (hashCode method) and offsetBuffer with SIZE_WIDTH (setSize method). It doesn't introduce real changes in the logic as OFFSET_WIDTH == SIZE_WIDTH == 4

  • Plus small refactoring of ListViewVector to avoid code duplication and similar issues in the future.


It's a bug fix.


Closes #470.

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

Please add the bug-fix label.

lidavidm added the bug-fix PRs that fix a big. label Feb 15, 2026
github-actions Bot added this to the 19.0.0 milestone Feb 15, 2026
…(hashCode) and offsetBuffer with SIZE_WIDTH (setSize) plus refactoring to avoid code duplication in ListViewVector
axreldable force-pushed the gh-470-get-end-index-list-view-1 branch from aec2975 to ade73e5 Compare February 16, 2026 19:29

jbonofre left a comment

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

It looks good to me.

jbonofre merged commit 9fd4973 into apache:main Feb 17, 2026
37 of 38 checks passed
axreldable deleted the gh-470-get-end-index-list-view-1 branch February 26, 2026 21:09
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

3 participants


Back | FazBrowse Home | New Git URL