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


##########
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:
   I don't fully understand it yet. I filed 
https://github.com/apache/datafusion-comet/issues/2147 to track figuring this 
out. It only happened in a very small number of tests.



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