Skip to content

Conversation

@KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented May 6, 2025

This change allows you to define one time shift for a measure without specifying a time dimension. In this case, timeShift interval and type will be applied to query time dimension(s) just like rollingWindows do.

You still can define an array of timeShifts (>1), but in this case, you'll have to specify time dimensions in each.

Check List

  • Tests have 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

@codecov
Copy link

codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 57.30%. Comparing base (9bb4a2f) to head (5e0bb54).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...es/cubejs-schema-compiler/src/adapter/BaseQuery.js 50.00% 6 Missing ⚠️
...bejs-schema-compiler/src/compiler/CubeEvaluator.ts 50.00% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (9bb4a2f) and HEAD (5e0bb54). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (9bb4a2f) HEAD (5e0bb54)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9545       +/-   ##
===========================================
- Coverage   84.09%   57.30%   -26.80%     
===========================================
  Files         230      165       -65     
  Lines       84377    13564    -70813     
  Branches        0     2279     +2279     
===========================================
- Hits        70959     7773    -63186     
+ Misses      13418     5482     -7936     
- Partials        0      309      +309     
Flag Coverage Δ
cube-backend 57.30% <56.25%> (?)
cubesql ?

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.

@KSDaemon KSDaemon marked this pull request as ready for review May 6, 2025 19:22
@KSDaemon KSDaemon requested a review from a team as a code owner May 6, 2025 19:22
@KSDaemon KSDaemon merged commit 320484f into master May 7, 2025
61 checks passed
@KSDaemon KSDaemon deleted the feat/timeshift-no-time-dim branch May 7, 2025 12:42
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
…sion (cube-js#9545)

* make timeDimension in timeshift measure optional

* fix evaluateMultiStageReferences

* optional in basequery

* use shiftInterval even if timeShift is w/o timeDimension

* tests
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.

4 participants