Incorrect element order on CLI output for ZPOPMAX and ZPOPMIN
defterade opened this issue · 2 comments
defterade commented
Shown on website:
redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "3"
2) "three"
redis>
Expected output:
redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "three"
2) "3"
redis>
alviezhang commented
Same issue. This would cause a problem when I execute this script:
redis.call('ZADD', 'test', '1.0', 'a', '2.0', 'b')
local values = redis.call('ZPOPMIN', 'test', 2)
redis.call('ZADD', 'test', unpack(values))
itamarhaber commented
I believe that the documentation has been fixed and now provides the correct order of arguments - please confirm.