andygrove commented on code in PR #2163:
URL: https://github.com/apache/datafusion-comet/pull/2163#discussion_r2282905797


##########
docs/source/contributor-guide/plugin_overview.md:
##########
@@ -140,8 +140,28 @@ accessing Arrow data structures from multiple languages.
 
 [Arrow C Data Interface]: 
https://arrow.apache.org/docs/format/CDataInterface.html
 
-- `CometExecIterator` invokes native plans and uses Arrow FFI to read the 
output batches
-- Native `ScanExec` operators call `CometBatchIterator` via JNI to fetch input 
batches from the JVM
+### Array Ownership and Lifecycle
+
+#### Importing Batches from Native to JVM
+
+`CometExecIterator` invokes native plans by calling the JNI function 
`executePlan`. The ownership of the output 
+batches, which are created in native code, is transferred to FFI ready to be 
consumed by Java once the `executePlan` 

Review Comment:
   Yes, it appears so. In `FFI_ArrowArray::new`, the `release` pointer is set 
to point to the following function:
   
   ```rust
   // callback used to drop [FFI_ArrowArray] when it is exported
   unsafe extern "C" fn release_array(array: *mut FFI_ArrowArray)
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to