bodduv commented on code in PR #1136:
URL: https://github.com/apache/arrow-java/pull/1136#discussion_r3201650516
##########
vector/src/main/java/org/apache/arrow/vector/complex/impl/UnionListReader.java:
##########
@@ -52,14 +52,24 @@ public boolean isSet() {
@Override
public void setPosition(int index) {
- super.setPosition(index);
- if (vector.getOffsetBuffer().capacity() == 0) {
- currentOffset = 0;
- maxOffset = 0;
- } else {
- currentOffset = vector.getOffsetBuffer().getInt(index * (long)
OFFSET_WIDTH) - 1;
- maxOffset = vector.getOffsetBuffer().getInt((index + 1) * (long)
OFFSET_WIDTH);
+ int valueCount = vector.getValueCount();
+ if (UnionListReaderBoundsChecker.isEmptyVectorPosition(index, valueCount))
{
+ setEmptyPosition(index);
+ return;
}
+
+ UnionListReaderBoundsChecker.checkIndex(index, valueCount);
Review Comment:
could you check again?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]