malinjawi commented on code in PR #12131:
URL: https://github.com/apache/gluten/pull/12131#discussion_r3312837331


##########
gluten-arrow/src/main/java/org/apache/gluten/vectorized/ColumnarBatchOutIterator.java:
##########
@@ -31,11 +31,17 @@ public class ColumnarBatchOutIterator extends 
ClosableIterator<ColumnarBatch>
     implements RuntimeAware {
   private final Runtime runtime;
   private final long iterHandle;
+  private final Object retainedReference;
 
   public ColumnarBatchOutIterator(Runtime runtime, long iterHandle) {
+    this(runtime, iterHandle, null);
+  }
+
+  public ColumnarBatchOutIterator(Runtime runtime, long iterHandle, Object 
retainedReference) {

Review Comment:
   Yea that was unclear name so I renamed this to `retainedSplitPayloadBuffers` 
and typed it as ByteBuffer[][]. 
   
   It keeps the Java-owned direct buffers reachable while Velox holds native 
views into them, so the payload memory cannot be GC’d during scan execution.
   
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to