BITROAROP
BITROAROP <AND | OR | XOR | NOT | DIFF | DIFF1 | ANDOR | ONE> destkey key [key ...]
- Available since:
- Redis Open Source 8.12.0
- Time complexity:
- O(N)
- ACL categories:
-
@write,@bitmap,@slow, - Compatibility:
- Redis Software and Redis Cloud compatibility
BITROAROP is an internal command that preserves native bitmap results during
replication and append-only file (AOF) replay. Applications cannot call it
directly.
Required arguments
AND | OR | XOR | NOT | DIFF | DIFF1 | ANDOR | ONE
The bitwise operation, with the same meaning as in
BITOP.
destkey
The destination key. The result overwrites its existing value and removes its expiration.
key [key ...]
The source bitmap keys. Sources can be strings, native bitmaps, or missing keys.
NOT requires exactly one source; DIFF, DIFF1, and ANDOR require at least
two. Other operations require at least one source.
Details
Redis uses this command to replay a native bitmap result independently of the
receiving node's bitmap-default-roaring setting. Ordinary clients receive an
unknown-command error and do not see it in COMMAND INFO or COMMAND DOCS.
The operation follows BITOP semantics, including zero-padding shorter inputs.
A result with a nonzero logical byte length is stored as a native bitmap, even
when all its bits are zero. If all inputs are missing or have zero logical
length, Redis deletes the destination key.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ❌ Standard |
❌ Standard |