You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is (double) numeric data value of the sample. The double number should follow [RFC 7159](https://tools.ietf.org/html/rfc7159) (JSON standard). In particular, the parser rejects overly large values that do not fit in binary64. It does not accept NaN or infinite values.
115
+
is (double) numeric data value of the sample. The double number should follow [RFC 7159](https://tools.ietf.org/html/rfc7159) (JSON standard). In particular, the parser rejects overly large values that do not fit in binary64. It does not accept infinite values. NaN (Not a Number) values are supported starting from Redis 8.6.
116
116
</details>
117
117
118
118
<note><b>Notes:</b>
@@ -173,6 +173,8 @@ This override is effective only for this single command and does not set the tim
173
173
-`MAX`: only override if the value is higher than the existing value
174
174
-`SUM`: If a previous sample exists, add the new sample to it so that the updated value is set to (previous + new). If no previous sample exists, the value is set to the new value.
175
175
176
+
<note><b>NaN Handling (Redis 8.6+):</b> When using `MIN`, `MAX`, or `SUM` policies, an error is returned if there is an existing value in the specified timestamp and either the previous or the new value (but not both) are NaN.</note>
177
+
176
178
This argument has no effect when a new time series is created by this command.
177
179
</details>
178
180
@@ -192,6 +194,8 @@ When not specified: set to the global [IGNORE_MAX_TIME_DIFF]({{< relref "develop
192
194
193
195
These parameters are used when creating a new time series to set the per-key parameters, and are ignored when called with an existing time series (the existing per-key configuration parameters is used).
194
196
197
+
<note><b>NaN Handling (Redis 8.6+):</b> NaN values are never regarded as duplicates when using the `IGNORE` parameters.</note>
is numeric value of the subtrahend (double). Starting from Redis 8.6, an error is returned if the subtrahend is NaN.
116
116
</details>
117
117
118
118
<note><b>Notes</b>
@@ -133,8 +133,10 @@ Unix time is the number of milliseconds that have elapsed since 00:00:00 UTC on
133
133
`timestamp` must be equal to or higher than the maximum existing timestamp. When equal, the value of the sample with the maximum existing timestamp is decreased. If it is higher, a new sample with a timestamp set to `timestamp` is created, and its value is set to the value of the sample with the maximum existing timestamp minus `subtrahend`.
134
134
135
135
If the time series is empty, the value is set to `subtrahend`.
136
-
136
+
137
137
When not specified, the timestamp is set to the Unix time of the server's clock.
138
+
139
+
<note><b>NaN Handling (Redis 8.6+):</b> An error is returned if the current value at the maximum existing timestamp is NaN.</note>
is numeric value of the addend (double). Starting from Redis 8.6, an error is returned if the addend is NaN.
116
116
</details>
117
117
118
118
<note><b>Notes</b>
@@ -132,9 +132,11 @@ Unix time is the number of milliseconds that have elapsed since 00:00:00 UTC on
132
132
133
133
`timestamp` must be equal to or higher than the maximum existing timestamp. When equal, the value of the sample with the maximum existing timestamp is increased. If it is higher, a new sample with a timestamp set to `timestamp` is created, and its value is set to the value of the sample with the maximum existing timestamp plus `addend`.
134
134
135
-
If the time series is empty, the value is set to `addend`.
136
-
135
+
If the time series is empty, the value is set to `addend`.
136
+
137
137
When not specified, the timestamp is set to the Unix time of the server's clock.
138
+
139
+
<note><b>NaN Handling (Redis 8.6+):</b> An error is returned if the current value at the maximum existing timestamp is NaN.</note>
Copy file name to clipboardExpand all lines: content/commands/ts.madd.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Unix time is the number of milliseconds that have elapsed since 00:00:00 UTC on
62
62
<detailsopen>
63
63
<summary><code>value</code></summary>
64
64
65
-
is numeric data value of the sample (double). The double number should follow <ahref="https://tools.ietf.org/html/rfc7159">RFC 7159</a> (a JSON standard). The parser rejects overly large values that would not fit in binary64. It does not accept NaN or infinite values.
65
+
is numeric data value of the sample (double). The double number should follow <ahref="https://tools.ietf.org/html/rfc7159">RFC 7159</a> (a JSON standard). The parser rejects overly large values that would not fit in binary64. It does not accept infinite values. NaN (Not a Number) values are supported starting from Redis 8.6.
Get the sample with the highest timestamp from each time series matching a specific filter.
73
+
Get the sample with the highest timestamp from each time series matching a specific filter. Starting from Redis 8.6, NaN values are included in the results.
74
74
75
75
{{< note >}}
76
76
This command will reply only if the current user has read access to all keys that match the filter.
Query a range across multiple time series by filters in the forward direction.
180
+
Query a range across multiple time series by filters in the forward direction. Starting from Redis 8.6, NaN values are included in raw measurement reports (queries without aggregation).
181
181
182
182
{{< note >}}
183
183
This command will reply only if the current user has read access to all keys that match the filter.
@@ -240,7 +240,7 @@ When used together with `AGGREGATION`: samples are filtered before being aggrega
240
240
<detailsopen>
241
241
<summary><code>FILTER_BY_VALUE min max</code> (since RedisTimeSeries v1.6)</summary>
242
242
243
-
filters samples by minimum and maximum values.
243
+
filters samples by minimum and maximum values. Starting from Redis 8.6, `min` and `max` cannot be NaN values.
244
244
245
245
When used together with `AGGREGATION`: samples are filtered before being aggregated.
246
246
</details>
@@ -291,19 +291,21 @@ per time series, aggregates samples into time buckets, where:
0 commit comments