metabase-clickhouse-driver
metabase-clickhouse-driver copied to clipboard
Add fully fledged time zones support
Despite ClickHouse itself featuring great time zone(s) support, these two driver features were never enabled:
:set-timezone
:convert-timezone
There was a draft attempt from me recently, with this snippet commented out and a few other parts missing: https://github.com/ClickHouse/metabase-clickhouse-driver/blob/b19928448adc5961bd37a8080b271f57756f67e1/src/metabase/driver/clickhouse_qp.clj#L320-L327
However, a significant amount of Metabase timezone-related tests fail, most of the time because of hardcoded branches for specific drivers.
Examples of such tests:
- https://github.com/metabase/metabase/blob/master/test/metabase/query_processor_test/date_time_zone_functions_test.clj#L273-L304
- https://github.com/metabase/metabase/blob/master/test/metabase/query_processor_test/date_time_zone_functions_test.clj#L190-L198
- https://github.com/metabase/metabase/blob/master/test/metabase/query_processor_test/date_time_zone_functions_test.clj#L705-L722
Related Metabase issue to remove the hardcoded parts: https://github.com/metabase/metabase/issues/26807