adriangb commented on code in PR #15770: URL: https://github.com/apache/datafusion/pull/15770#discussion_r2145924185
########## datafusion/physical-optimizer/src/enforce_sorting/sort_pushdown.rs: ########## @@ -114,6 +118,18 @@ fn pushdown_sorts_helper( sort_push_down.data.fetch = fetch; sort_push_down.data.ordering_requirement = Some(OrderingRequirements::from(sort_ordering)); + let filter = plan + .as_any() + .downcast_ref::<SortExec>() + .and_then(|s| s.filter().clone()); Review Comment: I see what you mean now. It would be `ExecutionPlan::dynamic_filters(&self) -> Arc<DynamicFilterPhysicalExpr>` which is fully typed. That sounds reasonable 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: 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