alamb commented on PR #13795: URL: https://github.com/apache/datafusion/pull/13795#issuecomment-2548314742
> I am concerned that the purported benefit > > > something that supports indexes e.g. Postgres then this new version can be pushed down to the index while the CASE expressions cannot. > > may be a result of overly aggressive pruning. I would assume PostgreSQL can handle and optimize CASE expressions the same way or better than we can (but i may be wrong), so CASE vs coalesce shouldn't make a difference. For some backstory (that I happen to know) is that I believe @adriangb 's usecase is to use the PruningPredicate rewriter to rewrite expressions into range analysis expressions that are then pushed into postgres for execution (aka he is effectively executing the rewritten predicate expression on a posgres database that stores the min/maxes) I agree it would be useful to understand why case is causing a problem -- 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