mbutrovich commented on code in PR #1887: URL: https://github.com/apache/datafusion-comet/pull/1887#discussion_r2191295898
########## native/core/src/execution/planner.rs: ########## @@ -987,15 +966,22 @@ impl PhysicalPlanner { let predicate = self.create_expr(filter.predicate.as_ref().unwrap(), child.schema())?; + let child_possibly_copied: Arc<dyn ExecutionPlan> = + if filter.wrap_child_in_copy_exec { + Self::wrap_in_copy_exec(Arc::clone(&child.native_plan)) + } else { + Arc::clone(&child.native_plan) + }; + let filter: Arc<dyn ExecutionPlan> = if filter.use_datafusion_filter { Arc::new(DataFusionFilterExec::try_new( predicate, - Arc::clone(&child.native_plan), + Arc::clone(&Arc::clone(&child_possibly_copied)), )?) } else { Arc::new(CometFilterExec::try_new( predicate, - Arc::clone(&child.native_plan), + Arc::clone(&Arc::clone(&child_possibly_copied)), Review Comment: I suspect I'm doing something dumb here and will revisit in the AM. -- 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