TDIGEST.MAX
Syntax
TDIGEST.MAX key
- Available in:
- Redis Open Source / Bloom 2.4.0
- Time complexity:
- O(1)
- ACL categories:
-
@tdigest
,@read
,@fast
,
Returns the maximum observation value from a t-digest sketch.
Required arguments
key
is the key name for an existing t-digest sketch.
Examples
redis> TDIGEST.CREATE t
OK
redis> TDIGEST.MAX t
"nan"
redis> TDIGEST.ADD t 3 4 1 2 5
OK
redis>TDIGEST.MAX t
"5"
Return information
One of the following:
- Bulk string reply as floating-point representing the maximum observation value from the given sketch. The result is always accurate.
nan
is returned if the sketch is empty. - Simple string reply in these cases: incorrect number of arguments or incorrect key type.