Describe the bug
Calendar dates are cast to month when joining in Custom questions
To Reproduce
-
Generate the calendar view:
CREATE VIEW playground.lot_calendar AS
SELECT '2014-12-01' + 1 AS calendar_date
UNION ALL
SELECT '2014-12-01' + 2 AS calendar_date
UNION ALL
SELECT '2014-12-01' + 3 AS calendar_date
UNION ALL
SELECT '2014-12-01' + 4 AS calendar_date
; -
Ask a question > Custom question > use view (lot_calendar) as 'Data' and join itself (lot_calendar) on calendar_date (see screenshot for generated SQL)
- The join is on calendar_date month truncated
Expected behaviour
Joining on calendar_date (not truncated) instead of calendar_date month truncated
We're running Metabase version 0.38.2