Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schema-compiler): use toDateTime64 for pre-1970 dates CH #8390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ilex4524
Copy link

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • 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.

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-react-pivot-table ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 1:13pm
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Jun 25, 2024
@Ilex4524 Ilex4524 marked this pull request as ready for review June 25, 2024 14:51
@Ilex4524 Ilex4524 requested a review from a team as a code owner June 25, 2024 14:51
@igorlukanin igorlukanin added the driver:clickhouse Issues related to the ClickHouse driver label Jun 25, 2024
@igorlukanin
Copy link
Member

Thanks for your contribution @Ilex4524 🙌

It would be great if @paveltiunov or @ovr can take a look at these changes.

…ckHouseQuery adapter to handle dates before 1970
@Ilex4524 Ilex4524 force-pushed the fix/datetime64-clickhouse-adapter branch from 0b1ad9f to d1c4603 Compare June 26, 2024 13:12
@ovr ovr assigned ovr and unassigned paveltiunov Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver:clickhouse Issues related to the ClickHouse driver pr:community Contribution from Cube.js community members.
4 participants