timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.82k stars 852 forks source link

Allow CAggs with variable sized bucked with origin/offset #7005

Closed fabriziomello closed 4 weeks ago

fabriziomello commented 4 weeks ago

On 2.15.x we added complete support of CAggs using time bucket with origin and/or offset, but we restrict the creating when the bucked size is variable due to some uncertaing regarding monthly buckets.

When bucketing by month we always align with the beginning of the month even defining an origin with day component. So to be consistent with the current implementation we'll not change this behavior and allow it to be used in Continuous Aggregates.

Disable-check: force-changelog-file

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.71%. Comparing base (59f50f2) to head (fe75f18). Report is 202 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7005 +/- ## ========================================== + Coverage 80.06% 81.71% +1.65% ========================================== Files 190 199 +9 Lines 37181 37012 -169 Branches 9450 9670 +220 ========================================== + Hits 29770 30246 +476 + Misses 2997 2874 -123 + Partials 4414 3892 -522 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timescale-automation commented 4 weeks ago

Automated backport to 2.15.x not done: cherry-pick failed.

Git status

HEAD detached at origin/2.15.x
You are currently cherry-picking commit af8ca2dab.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    modified:   tsl/test/expected/cagg_query.out
    modified:   tsl/test/expected/cagg_usage-14.out
    modified:   tsl/test/expected/cagg_usage-15.out
    modified:   tsl/test/expected/cagg_usage-16.out
    modified:   tsl/test/sql/cagg_ddl.sql.in
    modified:   tsl/test/sql/cagg_query.sql
    modified:   tsl/test/sql/cagg_usage.sql.in

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   tsl/src/continuous_aggs/common.c
    both modified:   tsl/test/expected/cagg_ddl-14.out
    both modified:   tsl/test/expected/cagg_ddl-15.out
    both modified:   tsl/test/expected/cagg_ddl-16.out

Job log