Skip to content

R64.MIN ​

CategoryDescription
SyntaxR64.MAX key
Time complexityO(1)
Supports structuresBitmap64
Command descriptionRetrieves the offset of the last bit that has a value of 1 in a Roaring key.

Parameter ​

  • key: The name of the Roaring bitmap key.

Output ​

  • If the operation is successful:
    • If bits that have a value of 1 exist in the key, the integer offset of the last bit that has a value of 1 is returned.
    • If no bits that have a value of 1 exist in the key or if the key does not exist, a value of -1 is returned.
  • Otherwise, an error message is returned.

Examples ​

Basic Usage ​

$ redis-cli
127.0.0.1:6379> R64.SETINTARRAY foo 3 4 5
OK
127.0.0.1:6379> R64.MAX foo
"5"

Usage Notes ​

  • To properly handle bigint values, use RESP3 protocol; otherwise the result will be returned as a string