emkornfield commented on code in PR #13248:
URL: https://github.com/apache/arrow/pull/13248#discussion_r993677114
##########
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());
+ targetArrowBuf.readerIndex(sourceBuffer.readerIndex());
+ targetArrowBuf.writerIndex(sourceBuffer.writerIndex());
+
+ return new OwnershipTransferResult() {
Review Comment:
can OwnershipTransferNOOP be used here?
--
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]