Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zrange doesn't support BYSCORE #307

Open
floriandejonckheere opened this issue Aug 3, 2024 · 0 comments
Open

zrange doesn't support BYSCORE #307

floriandejonckheere opened this issue Aug 3, 2024 · 0 comments
Labels
bug contributions-welcome Contributions from anyone are welcome

Comments

@floriandejonckheere
Copy link
Contributor

Starting with Redis 6.2.0, the ZRANGE command with BYSCORE argument replaces the ZRANGEBYSCORE command. However, in this implementation the ZRANGE command ignores the argument and only respects the index-based range query.

real_redis.zadd 'zset', 60, 'message0'
 => true 
real_redis.zadd 'zset', 61, 'message1'
 => true 
real_redis.zrange 'zset', 0, 1, byscore: true, with_scores: true
 => [] 

mock_redis.zadd 'zset', 60, 'message0'
 => true
mock_redis.zadd 'zset', 61, 'message1'
 => true 
mock_redis.zrange 'zset', 0, 1, byscore: true, with_scores: true
 => [["message0", 60.0], ["message1", 61.0]]
mock_redis.zrangebyscore 'zset', 0, 1, with_scores: true
=> []
@sds sds added bug contributions-welcome Contributions from anyone are welcome labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug contributions-welcome Contributions from anyone are welcome
Projects
None yet
Development

No branches or pull requests

2 participants