aqni commented on issue #41648:
URL: https://github.com/apache/arrow/issues/41648#issuecomment-2141130703
> @aqni could you please try the following
>
> ```java
> @Test
> public void testSplitAndTransferFixedWithVector2() {
> RootAllocator allocator = new RootAllocator(Long.MAX_VALUE);
> try (BufferAllocator child = allocator.newChildAllocator("child", 0,
Long.MAX_VALUE)) {
> try (IntVector vector = new IntVector("vector", child)) {
> vector.setSafe(0, 1);
> vector.setValueCount(1);
> TransferPair transferPair = vector.getTransferPair(allocator);
> transferPair.splitAndTransfer(0, 1);
> try (ValueVector slice = transferPair.getTo()) {
> // no-op try-with-resource
> }
> }
> }
> }
> ```
This example will not throw an exception. But I need to transfer ownership
between different allocators, and this example does not reflect the problem
very well.
--
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]