parthchandra commented on code in PR #2142:
URL: https://github.com/apache/datafusion-comet/pull/2142#discussion_r2274665498


##########
native/core/src/execution/planner.rs:
##########
@@ -2610,10 +2610,23 @@ impl From<ExpressionError> for DataFusionError {
 /// modification. This is used to determine if we need to copy the input batch 
to avoid
 /// data corruption from reusing the input batch.
 fn can_reuse_input_batch(op: &Arc<dyn ExecutionPlan>) -> bool {
-    if op.as_any().is::<ProjectionExec>() || 
op.as_any().is::<LocalLimitExec>() {
-        can_reuse_input_batch(op.children()[0])
+    if op.as_any().is::<ScanExec>() {
+        // JVM side can return arrow buffers to the pool

Review Comment:
   Isn't the JVM returning a buffer to the pool the normal behavior? Native 
allocates -> FFI -> JVM consumes and releases the buffer?
   Also, how is `native_iceberg_compat`  reusing the buffer?



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