Changes between Initial Version and Version 1 of Ticket #29692, comment 2


Ignore:
Timestamp:
Aug 20, 2018, 12:20:25 PM (6 years ago)
Author:
Marcin Nowak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29692, comment 2

    initial v1  
    66> Allowing the ordering optimization stuff to handle arbitrary RawSQL may be difficult.
    77
    8 Personally I'd like to skip RawSQL clauses in the block which is responsible for finding duplicates. If someone is using raw sqls, he knows the best what he is doing, IMO. And it is quite strange if Django removes silently part of your SQL. This is very confusing. And please note that printing a `Query` instance was generating incomplete sql, but while checking `Query.order_by` manually, the return value was containing all clauses. I thought that just printing is affected, but our QA dept told me the truth ;)
     8Personally I'd like to skip RawSQL clauses in the block which is responsible for finding duplicates. If someone is using raw sqls, he knows the best what he is doing, IMO. And it is quite strange if Django removes silently part of your SQL. This is very confusing. And please note that printing a `Query` instance was generating incomplete sql, but while checking `Query.order_by` manually, the return value was containing all clauses. I thought that just printing was affected, but our QA dept told me the truth ;)
    99
    1010I know there is no effective way to compare similarity of two raw clauses. This may be hard for expression objects, too, but you have a possibility to implement some `__eq__` magic (instead of comparation of generated sqls). Unfortunately I don't know why duplicates detection was implemented, so it's hard to tell how to improve this part.
Back to Top