Repository navigation
[FEAT]: Time aligned bucketing and CAs - #29
Merged
Merged
Conversation
… old data as ready to compact
Adds custom time bucket alignment (origin parameter) to continuous aggregates, matching TimescaleDB 2.15.0 feature parity. This enables users to align pre-computed aggregates to custom boundaries like business hours, specific timezones, or calendar events. Core Changes: - Add origin_micros field to ContinuousAggregateMetadata struct - Update continuous aggregate refresh to use bucket_with_origin() - Propagate origin through aggregation pipeline Protobuf API: - Add optional origin_micros field to CreateContinuousAggregateRequest - Add optional origin_micros field to ContinuousAggregateInfo Client Library: - Add .origin(timestamp_micros) method to ContinuousAggregateBuilder - Include detailed documentation with business hours example - Maintain backward compatibility (defaults to origin=0) Query DSL: - Support "create continuous aggregate ... bucket 5m origin <timestamp>" - Optional origin syntax in CREATE CONTINUOUS AGGREGATE commands Implementation Details: - Server stores origin_micros in metadata during creation - Refresh process uses stored origin with TimeBucketedAggregator::new_with_origin() - Cache keys remain unchanged (origin is part of aggregate definition) Testing: - All 504 library tests passing - All integration tests passing - Doctest fixed for Client::connect usage This completes the time-aligned bucketing feature across all interfaces: regular queries, DSL queries, and continuous aggregates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Type of Change
Please delete options that are not relevant.
Testing
Please describe the tests you ran to verify your changes. Provide instructions so we can reproduce.
cargo test)Performance Impact
Documentation
docs/(if needed)