Changes between Version 3 and Version 4 of Ticket #34255, comment 6


Ignore:
Timestamp:
Jan 12, 2023, 11:23:18 PM (23 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34255, comment 6

    v3 v4  
    11Right, it doesn't need `ARRAY` to be present to reproduce the crash but the reason why we can't simply augment the select clause with `year` in order to `GROUP BY 1` (or `GROUP BY year`) is that it would yield tuples with more columns than the user is asking for when doing an explicit `values("json")`.
    22
    3 If we want to augment the `SELECT` clause when explicitly grouping by a parameterized expression (`ExtractYear("start_at", tzinfo=TZ)` is this case) then we must make sure to de-augment the resulting query to ensure the query preserves its semantic. The usage of `ARRAY/SubqueryArray` just happens to be a good example of why this is important but the same could be said of an `__in` lookup that also only expects a single column to be selected.
     3If we want to augment the `SELECT` clause when explicitly grouping by a parameterized expression (`ExtractYear("start_at", tzinfo=TZ)` is this case) then we must make sure to de-augment the resulting query to ensure the query (''mask'' it) to preserves its semantic. The usage of `ARRAY/SubqueryArray` just happens to be a good example of why this is important but the same could be said of an `__in` lookup that also only expects a single column to be selected.
Back to Top