cube
cube copied to clipboard
fix(schema-compiler): use toDateTime64 for pre-1970 dates CH
Check List
- [x] Tests has been run in packages where changes made if available
- [x] Linter has been run for changed code
- [x] Tests for the changes have been added if not covered yet
- [ ] Docs have been added / updated if required
Description of Changes Made (if issue reference is not provided)
This PR updates the ClickHouseQuery adapter to replace all instances of toDateTime
with toDateTime64
. This change ensures that dates before 1970 are handled correctly, particularly in time dimensions functionality.
Important Note for Users:
If your dataset includes dates before 1970, ensure that the enable_extended_results_for_datetime_functions
ClickHouse option is turned on. This setting is crucial for functions like toStartOfYear
to work correctly with dates outside the typical range.
For more information, refer to the ClickHouse documentation.