Changes between Version 1 and Version 2 of Ticket #36051, comment 3


Ignore:
Timestamp:
Jan 4, 2025, 8:23:35 PM (4 days ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36051, comment 3

    v1 v2  
    55To me #36042 and and this ticket should be addressed by introducing a `BaseExpression.allows_composite_expressions: bool = False` that we set to `True` on `Count` and `TupleLookupMixin` and make `BaseExpression.resolve_expression` raise a `ValueError` when it's set to `False` and any of its source expression is an instance of `ColPairs`.
    66
    7 Don't get me wrong I think we should define `arity` for `Aggregate` subclasses to guard against improper calls but I don't think that making `Func.resolve_expression` unpack composite expressions is something we should do for the aforementioned reasons.
     7Don't get me wrong I think we should define `arity` for `Aggregate` subclasses to guard against improper calls but I don't think that making `Func.resolve_expression` unpack composite expressions is something we should do for the aforementioned reasons. In essence this is the same problem as `model_instance.pk` now returning a `tuple` and requiring some special care but at the field resolving level.
Back to Top