-
Notifications
You must be signed in to change notification settings - Fork 469
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
Fix ZRANGE command should return an empty array when count = 0 #1492
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: clundro <[email protected]>
Signed-off-by: clundro <[email protected]>
Signed-off-by: clundro <[email protected]>
Signed-off-by: clundro <[email protected]>
Signed-off-by: clundro <[email protected]>
Signed-off-by: clundro <[email protected]>
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
@infdahai You can use expression like |
Signed-off-by: clundro <[email protected]>
infdahai
changed the title
Fix zset error: return nilstring when limit cnt == 0
Fix zset error: return the empty array when limit cnt == 0
Jun 12, 2023
git-hulk
reviewed
Jun 13, 2023
git-hulk
reviewed
Jun 13, 2023
Signed-off-by: clundro <[email protected]>
infdahai
commented
Jun 13, 2023
git-hulk
changed the title
Fix zset error: return the empty array when limit cnt == 0
Fix ZRANG command should return an empty array when count = 0
Jun 14, 2023
git-hulk
changed the title
Fix ZRANG command should return an empty array when count = 0
Fix ZRANGE command should return an empty array when count = 0
Jun 14, 2023
Signed-off-by: clundro <[email protected]>
torwig
approved these changes
Jun 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
git-hulk
approved these changes
Jun 14, 2023
Thanks all, merging.. |
jihuayu
pushed a commit
to jihuayu/incubator-kvrocks
that referenced
this pull request
Jun 16, 2023
…e#1492) Currently, ZRANGE will return all matched members if the count = 0 which is not consistent with the Redis behavior. For example: ```shell 127.0.0.1:6666> zadd zset11 1 a 2 b 3 c 4 d 5 e 6 f 7 g (integer) 7 127.0.0.1:6666> zrange zset11 0 6 byscore limit 0 0 ``` Redis will return an empty array: ```shell 127.0.0.1:6379> zadd zset11 1 a 2 b 3 c 4 d 5 e 6 f 7 g (integer) 7 127.0.0.1:6379> zrange zset11 0 6 byscore limit 0 0 (empty array) ``` But we got all matched members in ZSET: ```shell 127.0.0.1:6666> zrange zset11 0 6 byscore limit 0 0 1) "a" 2) "b" 3) "c" 4) "d" 5) "e" 6) "f" ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #1483
we parse the all procedure and return the empty array quickly when the count of limit is zero. The output is same as
redis
.