Skip to content

DuckDB dates interpreted as strings instead of timestamp #6782

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ygg
Copy link

@ygg ygg commented Jul 4, 2023

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

Issue Reference this PR resolves

Description of Changes Made (if issue reference is not provided)

CubeJS was treating DuckDB TIMESTAMPTZ data type as a string rather than a timestamp. This created problems with pre-aggregation processes, especially when trying to group data by units of time like months, weeks, etc.

@ygg ygg requested a review from a team as a code owner July 4, 2023 13:09
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.30%. Comparing base (b57ddc3) to head (04e3fcf).
Report is 2180 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6782      +/-   ##
==========================================
- Coverage   47.32%   47.30%   -0.03%     
==========================================
  Files         155      155              
  Lines       20438    20438              
  Branches     5167     5167              
==========================================
- Hits         9673     9668       -5     
- Misses      10449    10454       +5     
  Partials      316      316              
Flag Coverage Δ
cube-backend 47.30% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@paveltiunov paveltiunov self-assigned this Aug 30, 2023
@paveltiunov
Copy link
Member

@ygg Thanks for contributing! Could you please add an integration or smoke test for that?

@KSDaemon
Copy link
Member

Hi @ygg Can you elaborate when/where cube treats date_trunc's as strings rather then timestamps?

@igorlukanin igorlukanin self-assigned this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data source driver driver:duckdb pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants