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


##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -481,32 +481,29 @@ impl ExecutionPlan for FilterExec {
         _config: &ConfigOptions,
     ) -> Result<FilterPushdownPropagation<Arc<dyn ExecutionPlan>>> {
         if !matches!(phase, FilterPushdownPhase::Pre) {
-            return Ok(FilterPushdownPropagation::transparent(
-                child_pushdown_result,
-            ));
+            return Ok(FilterPushdownPropagation::all(child_pushdown_result));
         }
         // We absorb any parent filters that were not handled by our children
-        let mut unhandled_filters = child_pushdown_result
-            .parent_filters
-            .iter()
-            .filter_map(|f| match f {
-                PredicateSupport::Unsupported(expr) => Some(Arc::clone(expr)),
-                PredicateSupport::Supported(_) => None,
-            })
-            .collect_vec();
-        assert_eq!(
-            child_pushdown_result.self_filters.len(),
-            1,
-            "FilterExec should only have one child"
-        );
-        let unsupported_self_filters = child_pushdown_result.self_filters[0]
+        let unsupported_parent_filters =
+            child_pushdown_result.parent_filters.iter().filter_map(|f| {
+                matches!(f.all(), PredicateSupportDiscriminant::Unsupported)

Review Comment:
   We could do it via an extension trait but not sure that reduces the 
cognitive burden



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

Reply via email to