You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "mbutrovich (via GitHub)" <gi...@apache.org> on 2025/07/08 01:29:46 UTC

Re: [PR] chore: use DF scalar functions for StartsWith, EndsWith, Contains, DF LikeExpr [datafusion-comet]

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-unsubscribe@datafusion.apache.org

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


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