You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "UBarney (via GitHub)" <gi...@apache.org> on 2026/02/10 10:02:06 UTC
Re: [I] Make Clickbench Q29 5x faster for datafusion by extracting `SUM(..)` clauses [datafusion]
UBarney commented on issue #15524:
URL: https://github.com/apache/datafusion/issues/15524#issuecomment-3876600012
I think we can fix this issue by implementing `simplify` for `sum` https://github.com/apache/datafusion/blob/35ff4ab0a03fcc6615876eac76bac19887059ab3/datafusion/expr/src/udaf.rs#L682-L684, just like in https://github.com/apache/datafusion/pull/18837.
After this, we can support rewrites like:
- `sum(col+6) -> sum(col) + 6 * count(col)`
- `sum(col*6) -> sum(col) * 6`
- `max(-6*col+5) -> 5 + -6*min(col)`
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org