adriangb commented on code in PR #20145:
URL: https://github.com/apache/datafusion/pull/20145#discussion_r2765310438


##########
datafusion/physical-plan/src/union.rs:
##########
@@ -370,6 +376,66 @@ impl ExecutionPlan for UnionExec {
     ) -> Result<FilterDescription> {
         FilterDescription::from_children(parent_filters, &self.children())
     }
+
+    fn handle_child_pushdown_result(
+        &self,
+        phase: FilterPushdownPhase,
+        child_pushdown_result: ChildPushdownResult,
+        _config: &ConfigOptions,
+    ) -> Result<FilterPushdownPropagation<Arc<dyn ExecutionPlan>>> {
+        // For non-Pre phase, use default behavior
+        if !matches!(phase, FilterPushdownPhase::Pre) {

Review Comment:
   Agreed. The intuition here is to let the creator of the filter decide what 
to do with it.
   I don't like that it makes assumptions about the implementation / what the 
creators of the filter want to do, but I don't see a better way to handle this.
   I don't think forcing creation of the FilterExec would be good at least as 
things currently stand.
   
   But we should add a comment explaining this.



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