gruuya commented on PR #12943: URL: https://github.com/apache/datafusion/pull/12943#issuecomment-2444188686
> To get the filter above the aggregation (in postgres) we can do Ahh good point. I think my misunderstanding here is that I was concentrating on the `WHERE` clause within the `DISTINCT ON` (sub)query. So yes, I agree we should push down only compatible expressions from outside of the `DISTINCT ON` subquery, but the filter from within that (sub)query should always be pushed down (and I [think](https://github.com/apache/datafusion/pull/12943#discussion_r1820766069) there's a test missing for that). -- 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