Adding Time Series Multiple Aggregators support#4035
Draft
petyaslavova wants to merge 1 commit intomasterfrom
Draft
Adding Time Series Multiple Aggregators support#4035petyaslavova wants to merge 1 commit intomasterfrom
petyaslavova wants to merge 1 commit intomasterfrom
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
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.
Add support for multiple aggregators in TS.RANGE, TS.REVRANGE, TS.MRANGE, and TS.MREVRANGE
This PR adds support for passing multiple aggregators to the TimeSeries
range,revrange,mrange, andmrevrangecommands, as introduced in Redis 8.8.Previously, these commands only accepted a single
aggregation_typeparameter.With this change, users can now pass a list of aggregation types (e.g.,
["avg", "max"]) to retrieve multiple aggregations in a single call.The existing single-aggregator usage remains fully backward compatible.
Both the sync and async implementations have been updated to ensure full parity.
The
aggregation_typeparameter now accepts either a single string or a list of strings, and the command construction logic correctly serializes multiple aggregators when a list is provided.No public API signatures were broken — existing callers passing a single string will continue to work without any changes.
New tests have been added for both sync (
test_timeseries.py) and async (test_asyncio/test_timeseries.py) covering multi-aggregator scenarios forrange,revrange,mrange, andmrevrange.