- 🇦🇺Australia acbramley
This came up in BSI triage today.
We need an update to the issue summary including steps to reproduce.
Problem/Motivation
Follow up from #2159347: Aggregation not working simple test case →
Views is generating under some circumstances queries that have constant expressions inside the aggregation clause.
This, besides making no sense as constant values have no effect on aggregates, makes these queries incompatible with SQL Server and Oracle (probably Postgre too, but have not tested).
This is a query with a literal in aggregate:
SELECT uid FROM users GROUP BY 'literal', uid
This is without it:
SELECT uid FROM uers GROUP BY uid
Steps to reproduce
--
Proposed resolution
Skip constant values and expressions when generating the aggregation part of the query.
Remaining tasks
Review
RTBC
Commit
User interface changes
None.
API changes
None.
Postponed: needs info
11.0 🔥
views.module
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Particularly affects sites running on the PostgreSQL database.
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This came up in BSI triage today.
We need an update to the issue summary including steps to reproduce.