alamb commented on code in PR #19854:
URL: https://github.com/apache/datafusion/pull/19854#discussion_r2702574155


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -949,16 +953,17 @@ impl DefaultPhysicalPlanner {
                             async_map.async_exprs,
                             physical_input,
                         )?;
-                        FilterExec::try_new(
+                        FilterExecBuilder::new(
                             Arc::clone(&runtime_expr[0]),
                             Arc::new(async_exec),
-                        )?
+                        )
                         // project the output columns excluding the async 
functions
                         // The async functions are always appended to the end 
of the schema.
-                        .with_projection(Some(
+                        .apply_projection(Some(

Review Comment:
   I like this "apply projection" name 👍 



##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -92,39 +92,124 @@ pub struct FilterExec {
     fetch: Option<usize>,
 }
 
+/// Builder for [`FilterExec`] to set optional parameters
+pub struct FilterExecBuilder {
+    predicate: Arc<dyn PhysicalExpr>,
+    input: Arc<dyn ExecutionPlan>,
+    projection: Option<Vec<usize>>,
+    default_selectivity: u8,
+    batch_size: usize,

Review Comment:
   makes sense to me



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