Changes between Initial Version and Version 1 of Ticket #26430, comment 12


Ignore:
Timestamp:
May 18, 2021, 9:11:50 PM (4 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26430, comment 12

    initial v1  
    5252}}}
    5353
    54 I guess we could also use an hybrid approach where `SQLAggregateCompiler` only sets `supports_empty_result_set = False` if any of `outer_query.annotation_select.items()` is not a literal value prior to proceeding with the compilation/`as_sql` phase. That would keep the optimization for most cases but fallback to the database when it cannot be computed on the Python side.
     54I guess we could also use an hybrid approach where `SQLAggregateCompiler` only sets `supports_empty_result_set = False` if any of `outer_query.annotation_select.items()` pass through `.get_empty_result()` is not a literal value prior to proceeding with the compilation/`as_sql` phase. That would keep the optimization for most cases but fallback to the database when it cannot be computed on the Python side.
Back to Top