Skip to content

Conversation

@KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented Apr 18, 2025

Previously only day-to-second intervals were supported for Redshift custom granularities maths. This adds support for Year-to-month intervals. So all of this is now possible:

      - name: saletime
        sql: saletime
        type: time
        granularities:
          - name: half_year
            title: 6 month intervals
            interval: 6 months
          - name: half_year_by_1st_april
            title: Half year from Apr to Oct
            interval: 6 months
            offset: 3 months
          - name: fiscal_year_by_1st_feb
            title: Fiscal year by Feb
            interval: 1 year
            offset: 1 month
          - name: fiscal_year_by_15th_march
            interval: 1 year
            origin: '2024-03-15'
          - name: two_weeks_by_friday
            interval: 2 weeks
            origin: '2024-09-20 03:00:00+03:00'

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 Apr 18, 2025

Codecov Report

Attention: Patch coverage is 3.70370% with 26 lines in your changes missing coverage. Please review.

Project coverage is 58.37%. Comparing base (2e8126d) to head (5852361).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...ubejs-schema-compiler/src/adapter/RedshiftQuery.ts 3.70% 26 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (2e8126d) and HEAD (5852361). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (2e8126d) HEAD (5852361)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9489       +/-   ##
===========================================
- Coverage   83.91%   58.37%   -25.54%     
===========================================
  Files         229      167       -62     
  Lines       83681    14955    -68726     
  Branches        0     2960     +2960     
===========================================
- Hits        70218     8730    -61488     
+ Misses      13463     5879     -7584     
- Partials        0      346      +346     
Flag Coverage Δ
cube-backend 58.37% <3.70%> (?)
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 April 18, 2025 13:03
@KSDaemon KSDaemon requested review from a team as code owners April 18, 2025 13:03
@KSDaemon KSDaemon merged commit 2fc53f2 into master Apr 23, 2025
61 checks passed
@KSDaemon KSDaemon deleted the feat/custom-granularities-in-redshift branch April 23, 2025 08:10
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
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