Skip to content

Add support for new operations of BITOP command in Redis Community Edition 8.2 #4188

@ggivo

Description

@ggivo

Redis CE 8.2 supports new operations often required with BITOP command;

DIFF(X, Y1, Y2, …)
members of X that are not members of any of Y1, Y2 ,…
X ∧ ¬(Y1 ∨ Y2 ∨ …)

DIFF1(X, Y1, Y2, …)
members of one or more of Y1, Y2 ,… that are not members of X
¬X ∧ (Y1 ∨ Y2 ∨ …)

ANDOR(X, Y1, Y2, …)
members of X that are also members of one or more of Y1, Y2 ,…
X ∧ (Y1 ∨ Y2 ∨ …)

ONE(X1, X2, …) -
members of exactly one of X1, X2, …
For two bitmaps this is equivalent to XOR(X1, X2) (AKA symmetric difference., X1 ⊕ X2). However, for more than two bitmaps, XOR has little practical use.
In general this is COUNT(X1, X2, …) == 1

See more details here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions