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
splitAndTransfer on vectors throws if the vector is completely empty and the offset buffer is empty.
This is still the case for MapVector in release 18.0.0. We encounter this error with some regularity for a non-empty ListVector with an empty child MapVector:
java.lang.IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0))
at org.apache.arrow.memory.ArrowBuf.checkIndexD(ArrowBuf.java:299)
at org.apache.arrow.memory.ArrowBuf.chk(ArrowBuf.java:285)
at org.apache.arrow.memory.ArrowBuf.getInt(ArrowBuf.java:405)
at org.apache.arrow.vector.complex.MapVector$TransferImpl.splitAndTransfer(MapVector.java:214)
at org.apache.arrow.vector.complex.ListVector$TransferImpl.splitAndTransfer(ListVector.java:570)
Here ListVector calls dataTransferPair.splitAndTransfer(/* startPoint =*/ 0, /* sliceLength =*/ 0) on a MapVector with offsetBuffer.capacity() of 0.
The fix in #44627 can be identical to that for BaseLargeVariableWidthVector, BaseVariableWidthVector and ListVector in #41066
Component(s)
Java
The text was updated successfully, but these errors were encountered:
)
### Rationale for this change
Empty MapVector.splitAndTransfer throws `java.lang.IndexOutOfBoundsException`. Details in #44626
### What changes are included in this PR?
Fixed for MapVector as for other vector types in #41066
### Are these changes tested?
Added unit test mimicking the scenario we've observed where MapVector's offset buffer capacity is 0.
* GitHub Issue: #44626
Authored-by: Maksim Yegorov <[email protected]>
Signed-off-by: David Li <[email protected]>
Describe the bug, including details regarding any error messages, version, and platform.
As reported in #30866:
This is still the case for MapVector in release 18.0.0. We encounter this error with some regularity for a non-empty ListVector with an empty child MapVector:
Here ListVector calls
dataTransferPair.splitAndTransfer(/* startPoint =*/ 0, /* sliceLength =*/ 0)
on a MapVector withoffsetBuffer.capacity()
of 0.The fix in #44627 can be identical to that for BaseLargeVariableWidthVector, BaseVariableWidthVector and ListVector in #41066
Component(s)
Java
The text was updated successfully, but these errors were encountered: