mirror of
https://github.com/django/django.git
synced 2025-04-02 04:26:42 +00:00
The subquery pushdown only happens because another table is involved in filter. It's not the distinct usage that causes the pushdown. The distinct('description').order_by('pk') expression is not valid because SELECT DISTINCT ON must match initial ORDER BY expressions which is not the case here.