#14930: `values_list()` fails on queryset ordered by extra column
-------------------------------------+-------------------------------------
     Reporter:  lsaffre              |                    Owner:  fhahn
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Ready for
     Keywords:                       |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by akaariai):

 I am not sure what the code in L1002-L1004 in models/query.py is doing.
 The code might be OK, but why the code doesn't do: "if extra_names_mask"
 instead of "if self.extra_names is not None"? If the self.extra_names is
 not None check is correct, then the construction of extra_names_mask could
 be moved inside the if branch. Also, could same fields end up in the mask
 twice if they are both in self.extra_names and in the order by fields.
 Maybe that is OK.

 In addition it seems there are some slight optimization possibilities in
 doing some more work outside the innermost loop. Likely not too
 important...

 Still, it seems this is a step forward already, so I guess commit is OK.
 Of course, if the above issues can be dealt before commit then even
 better...

-- 
Ticket URL: <https://code.djangoproject.com/ticket/14930#comment:28>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1d3c60885319c8374fae97033b020050%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to