Changes between Initial Version and Version 2 of Ticket #20971


Ignore:
Timestamp:
Sep 9, 2013, 9:34:23 AM (11 years ago)
Author:
Shai Berger
Comment:

This seems to be a correctness problem on Oracle, but may cause performance issues elsewhere (other backends will group over deferred fields, in particular text-fields, which may indeed bring back the problems of #17144).

What this needs now is a test-case. Note that if the test checks the generated SQL (this may be done with qset.query.sql_with_params()) it can be made to fail on non-oracle backends.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20971

    • Property Type UncategorizedBug
  • Ticket #20971 – Description

    initial v2  
    22
    33E.g.
    4 y.xys.all().defer(list_of_all_text_fields).annotate(Count('z__pk', distinct=True) causes "DatabaseError: ORA-00932: inconsistent datatypes: expected - got NCLOB"
     4`y.xys.all().defer(list_of_all_text_fields).annotate(Count('z__pk', distinct=True)` causes "DatabaseError: ORA-00932: inconsistent datatypes: expected - got NCLOB"
    55
    66This is probably(?) because the "GROUP BY" clause will contain all the deferred fields.
    77
    8 As a workaround I have to do sum(len(set(x)) for x in y.xys.all().values_list('z__pk'))
     8As a workaround I have to do `sum(len(set(x)) for x in y.xys.all().values_list('z__pk'))`
    99Works flawlessly on PostgreSQL.
Back to Top