#34262: Queryset grouped by annotation with aggregates on another annotated
expression crashes on MySQL with sql_mode=only_full_group_by.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 4.1
(models, ORM) |
Severity: Normal | Resolution:
Keywords: mysql | Triage Stage: Accepted
only_full_group_by |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ontowhee):
Is there an expression in Django for ANY_VALUE()? I did a quick search for
"anyvalue” and “any.*value” but it did not come up with results. Would it
be useful to support such an expression?
My thought is, option 2 seems to be the lowest effort and risk to
implement (the other options can potentially be added in later if there is
a good solution). It can raise an error and suggest that the user apply
such an expression to the offending column. This way, django is not making
an arbitrary decision on wrapping the column with ANY_VALUE(). I haven’t
dived into what it would take to support such an expression, so this may
be naive. Any thoughts here?
--
Ticket URL: <https://code.djangoproject.com/ticket/34262#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194deecfb55-88268ba5-f717-4ff0-b251-7689bd8b2c36-000000%40eu-central-1.amazonses.com.