Skip to content

Conversation

@pjain1
Copy link
Member

@pjain1 pjain1 commented Jan 22, 2026

The tz argument in date_trunc throws error for grains bigger than day when applied on DATE types column.

The timezone argument of function dateTrunc with datepart 'month' is allowed only when the 2nd argument has the type DateTime: In scope SELECT CAST(date_trunc('month', measurement_date, 'UTC'), 'DateTime64') 

This argument was added to prevent issues in rill developer with embedded CH returning results in local timezone thus causing time spine join to fail. So hardcoding the tz for embedded to UTC in the config.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@pjain1 pjain1 requested a review from begelundmuller January 22, 2026 07:16
Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@begelundmuller begelundmuller merged commit a8287d4 into main Jan 22, 2026
19 of 20 checks passed
@begelundmuller begelundmuller deleted the utc_tz_embeded_ch branch January 22, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants