#25367: Allow expressions in .filter() calls
-------------------------------------+-------------------------------------
     Reporter:  Anssi Kääriäinen     |                    Owner:  Matthew
         Type:                       |  Schinckel
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"c2d4926702045e342a668057f0a758eec9db9436" c2d49267]:
 {{{
 #!CommitTicketReference repository=""
 revision="c2d4926702045e342a668057f0a758eec9db9436"
 Fixed #31910 -- Fixed crash of GIS aggregations over subqueries.

 Regression was introduced by fff5186 but was due a long standing issue.

 AggregateQuery was abusing Query.subquery: bool by stashing its
 compiled inner query's SQL for later use in its compiler which made
 select_format checks for Query.subquery wrongly assume the provide
 query was a subquery.

 This patch prevents that from happening by using a dedicated
 inner_query attribute which is compiled at a later time by
 SQLAggregateCompiler.

 Moving the inner query's compilation to SQLAggregateCompiler.compile
 had the side effect of addressing a long standing issue with
 aggregation subquery pushdown which prevented converters from being
 run. This is now fixed as the aggregation_regress adjustments
 demonstrate.

 Refs #25367.

 Thanks Eran Keydar for the report.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/25367#comment:19>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ad04b1a2ef4f3cc7c3393d4e413869e4%40djangoproject.com.

Reply via email to