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


Ignore:
Timestamp:
Aug 13, 2021, 11:43:42 AM (3 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33018, comment 2

    initial v1  
    11The `0` assignment on empty result set comes from [https://github.com/django/django/blob/6c3525a09db5177bf4e3856de85bf8b1300402d5/django/db/models/sql/compiler.py#L268-L270 this line]. I assume we could adjust the logic to rely on `getattr(col, 'empty_aggregate_value', NotImplemented)` and fallback to `'0'` if it's missing.
    22
    3 Makes me wonder if we want to rename `empty_aggregate_value` to `empty_result_set_value` instead since it's not entirely bound to aggregation anymore.
     3Makes me wonder if we'd want to rename `empty_aggregate_value` to `empty_result_set_value` instead since it would not entirely be bound to aggregation anymore.
    44
    55e.g. the following should exhibit the same behavior
Back to Top