dice icon indicating copy to clipboard operation
dice copied to clipboard

Inconsistent `BITOP`: BITOP throws error for strings

Open apoorvyadav1111 opened this issue 6 months ago • 5 comments

The command BITOP is not consistent with Redis implementation. Here are the steps to reproduce the issue

SET key1 "foobar"
SET key2 "abcdef"

Here's the output I observed in Redis v7.2.5

redis> BITOP AND dest key1 key2
(integer) 6

and here's the output I observed in DiceDB's latest commit of the master branch

127.0.0.1:7379> BITOP AND dest key1 key2
(error) ERR value is not a valid byte array

Make the implementation consistent with the Redis implementation. Make sure you are using Redis version 7.2.5 as a reference for the command implementation and to setup Redis

apoorvyadav1111 avatar Aug 27 '24 02:08 apoorvyadav1111