Skip to content

Adding Time Series Multiple Aggregators support#4035

Draft
petyaslavova wants to merge 1 commit intomasterfrom
ps_add_ts_multi_aggregators
Draft

Adding Time Series Multiple Aggregators support#4035
petyaslavova wants to merge 1 commit intomasterfrom
ps_add_ts_multi_aggregators

Conversation

@petyaslavova
Copy link
Copy Markdown
Collaborator

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, and mrevrange commands, as introduced in Redis 8.8.
Previously, these commands only accepted a single aggregation_type parameter.
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_type parameter 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 for range, revrange, mrange, and mrevrange.

@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Apr 16, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

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.

1 participant