lidavidm commented on code in PR #1465:
URL: https://github.com/apache/arrow-java/pull/1465#discussion_r4559988386
##########
vector/src/main/java/org/apache/arrow/vector/complex/LargeListVector.java:
##########
@@ -255,9 +255,14 @@ public void loadFieldBuffers(ArrowFieldNode fieldNode,
List<ArrowBuf> ownBuffers
ArrowBuf bitBuffer = ownBuffers.get(0);
ArrowBuf offBuffer = ownBuffers.get(1);
- validityBuffer.getReferenceManager().release();
+ // Release this vector's buffers first, so that a failure while loading
leaves it empty but
+ // usable. Unlike clear(), this keeps the child vectors.
+ validityBuffer = releaseBuffer(validityBuffer);
+ offsetBuffer = releaseBuffer(offsetBuffer);
Review Comment:
I guess this runs into the question of whether an empty offset buffer is
valid for a list vector...but it's consistent with before so we can defer that
discussion.
--
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]