zhztheplayer commented on code in PR #13248:
URL: https://github.com/apache/arrow/pull/13248#discussion_r885584782
##########
java/c/src/main/java/org/apache/arrow/c/CDataReferenceManager.java:
##########
@@ -104,7 +104,21 @@ public ArrowBuf deriveBuffer(ArrowBuf sourceBuffer, long
index, long length) {
@Override
public OwnershipTransferResult transferOwnership(ArrowBuf sourceBuffer,
BufferAllocator targetAllocator) {
- throw new UnsupportedOperationException();
+ ArrowBuf targetArrowBuf = this.deriveBuffer(sourceBuffer, 0,
sourceBuffer.capacity());
Review Comment:
Kind of. I would understand this as the original design of
`CDataReferenceManager` not to bind itself to any allocator.
To me it would be great if we take some time to find if it is possible to
make some refactors on ReferenceManager and BufferLedger to decouple allocator
instance from the base interface. Sounds OK to me that a native memory block
doesn't "belong to" any Java side allocator.
--
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]