You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ListViewVector#getElementEndIndex Returns Size not Index #470
public int getElementEndIndex(int index) {
// Retrieve the offset from the offset buffer instead of sizeBuffer
return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH);
}
public int getElementEndIndex(int index) { // Retrieve the offset from the offset buffer instead of sizeBuffer return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH); }
It works for ListVector, but it doesn't work for ListViewVector, as offsets can be out of order according to the specification. So we need to determine the end index of the element based on its offset and size.
public int getElementEndIndex(int index) {
return offsetBuffer.getInt(index * OFFSET_WIDTH) + sizeBuffer.getInt(index * SIZE_WIDTH);
}
Activity
vibhatha commentedon Jan 2, 2025
@nbauernfeind thanks for filing this issue. Would you like to make a PR?
joyCurry30 commentedon Jan 14, 2025
Can you assign to me ? I'd like to make a PR.
kou commentedon Jan 14, 2025
Done!
POORVANGIKA commentedon Jan 20, 2025
public int getElementEndIndex(int index) {
// Retrieve the offset from the offset buffer instead of sizeBuffer
return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH);
}
[apacheGH-470]ListViewVector#getElementEndIndex should returns size n…
[apacheGH-470]ListViewVector#getElementEndIndex should returns size n…
[apacheGH-470] Address comment.
apacheGH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) m…
apacheGH-470: [Vector] Fix bug of usage sizeBuffer with OFFSET_WIDTH …
axreldable commentedon Feb 15, 2026
It works for
ListVector, but it doesn't work forListViewVector, as offsets can be out of order according to the specification. So we need to determine the end index of the element based on its offset and size.apacheGH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) m…
apacheGH-470: [Vector] Fix bug of usage sizeBuffer with OFFSET_WIDTH …
apacheGH-470: [Vector] Apply mvn spotless:apply
apacheGH-470: [Vector] Fix ListViewVector.getElementEndIndex(index) m…