adriangb commented on code in PR #17238: URL: https://github.com/apache/datafusion/pull/17238#discussion_r2286017094
########## datafusion/physical-plan/src/projection.rs: ########## @@ -273,6 +278,24 @@ impl ExecutionPlan for ProjectionExec { Ok(Some(Arc::new(projection.clone()))) } } + + fn gather_filters_for_pushdown( + &self, + _phase: FilterPushdownPhase, + parent_filters: Vec<Arc<dyn PhysicalExpr>>, + _config: &ConfigOptions, + ) -> Result<FilterDescription> { + FilterDescription::from_children(parent_filters, &self.children()) Review Comment: While this will work it does not deal with aliases. There's a world of arbitrary complexity where we essentially apply inverse projections to filters so we can push them down, but that seems very hard. Alisases though should be easy and we can deal with them here. It would essentially involve transforming the expressions before calling `from_children` to invert any aliases. Could you file an issue for this bit and leave a comment saying this only handles unprojected columns for now? -- 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