You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "geoffreyclaude (via GitHub)" <gi...@apache.org> on 2026/09/08 08:24:04 UTC
[I] COUNT(... ORDER BY ...) can panic or undercount with nullable ordering keys [datafusion]
geoffreyclaude opened a new issue, #25054:
URL: https://github.com/apache/datafusion/issues/25054
`COUNT(... ORDER BY ...)` can panic when grouped or undercount when the ordering key is nullable because the ordering key is passed to the count accumulator as another argument.
```sql
SELECT COUNT(a + 0 ORDER BY b)
FROM (VALUES (1, NULL), (2, 20)) AS t(a, b);
```
Expected: `2`. Actual: `1`.
--
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.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
Re: [I] COUNT(... ORDER BY ...) can panic or undercount with nullable ordering keys [datafusion]
Posted by "geoffreyclaude (via GitHub)" <gi...@apache.org>.
geoffreyclaude closed issue #25054: COUNT(... ORDER BY ...) can panic or undercount with nullable ordering keys
URL: https://github.com/apache/datafusion/issues/25054
--
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
Re: [I] COUNT(... ORDER BY ...) can panic or undercount with nullable ordering keys [datafusion]
Posted by "geoffreyclaude (via GitHub)" <gi...@apache.org>.
geoffreyclaude commented on issue #25054:
URL: https://github.com/apache/datafusion/issues/25054#issuecomment-5581987642
Superseded by #25055, which was created using the repository Bug Report form so the configured bug label and Bug type are applied.
--
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