Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2020-10-21 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.726ae72c2d9e6c50d64f2f076205958f%40djangoproject.com.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2020-10-21 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.30c16d3aea73b1e00fc9dce489e2042c%40djangoproject.com.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2018-10-10 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Tzu-ping
 |  Chung
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Zach):

 If you need to filter on an annotated value while still using
 `.order_by('?')`, this could work:

 {{{#!python
 
Thing.objects.filter(pk__in=Thing.objects.annotate(rc=Count('related')).filter(rc__gte=2)).order_by('?')
 }}}

 This avoids the `GROUP BY RANDOM() ORDER BY RANDOM() ASC` issue while
 still allowing `.annotate()` and `.order_by('?')` to be used together.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b1e1210e584d6f747c9e1aeb956325a1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2018-10-09 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Tzu-ping
 |  Chung
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Zach):

 * cc: Zach (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.68b14dbf885fca10ebe8f03d77de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-11-04 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Tzu-ping
 |  Chung
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Matthias Kestenholz):

 It's documented that ordering will be included in the grouping clause so I
 wouldn't say that this behavior is unexpected. It seems to me that trying
 to remove some (but not all) columns from the group by clause according to
 new rules is less clear than the simple rule that is in place now.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.4039ee5ff8e9a7e84b5c4448a38f703d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-04-09 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 Some test additions are still needed.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5932001d6b815bf405c47a0ecc755adb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-04-01 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by uranusjr):

 * needs_better_patch:  1 => 0


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1755bccd3c87ff0d5ca3e9d810b8e857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-04-01 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 The new test isn't passing on MySQL/PostgreSQL.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0fcf26f1bfa48772fe4dee8f9afea82b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-30 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by uranusjr):

 > I wonder what would happen if we skipped all expressions that have no
 cols as source expressions (plus, we need to include any raw sql).

 This seems like a very good idea, and I can’t think of a scenario where
 this will break things. I’ve updated the PR.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.55aef2b139ebad3e165964167fb3660d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-22 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 I wonder what would happen if we skipped all expressions that have no cols
 as source expressions (plus, we need to include any raw sql).

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ff1106bfd1b7096908650b86913c1555%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-22 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by uranusjr):

 [https://github.com/django/django/pull/6322 PR]

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.9a05f77a40c2acae1a951257c73d9cee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-22 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  uranusjr
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by uranusjr):

 * owner:  nobody => uranusjr
 * needs_better_patch:  1 => 0
 * status:  new => assigned
 * needs_tests:  1 => 0


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f316e07f413d0a39e6462ada45c8153f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-21 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * needs_tests:  0 => 1


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.4001c82434d146af209da5c53b911a67%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-21 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
-+-
 Reporter:  uranusjr |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0f5213dde8186d786e7045c2fc044030%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26390: order_by('?') unexpectedly breaking queryset aggregation

2016-03-21 Thread Django
#26390: order_by('?') unexpectedly breaking queryset aggregation
--+
 Reporter:  uranusjr  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Normal| Resolution:
 Keywords:|   Triage Stage:  Unreviewed
Has patch:  0 |  Easy pickings:  0
UI/UX:  0 |
--+
Changes (by uranusjr):

 * Attachment "order-by-random-no-group.patch" added.

 Patch to SQLCompiler.get_group_by that excluds Random expressions

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.27333bb1e3a5bb60e476651501a2ca21%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.