Add withscore option to ZRANK and ZREVRANK. #11235
Merged
oranagra merged 6 commits intoredis:unstablefrom Nov 28, 2022
Merged
Conversation
zuiderkwast
reviewed
Sep 5, 2022
Contributor
zuiderkwast
left a comment
There was a problem hiding this comment.
It seems to be in line with the discussed solution. 👍
How about adding a simple test case for both commands?
Contributor
|
good job! welcome to redis : ) |
soloestoy
reviewed
Sep 6, 2022
soloestoy
reviewed
Sep 6, 2022
soloestoy
reviewed
Sep 6, 2022
44b23b9 to
c0302d5
Compare
soloestoy
approved these changes
Sep 6, 2022
soloestoy
reviewed
Sep 6, 2022
oranagra
approved these changes
Nov 9, 2022
Member
oranagra
left a comment
There was a problem hiding this comment.
sorry for the delay (been busy and forgot).
mostly LGTM, i need some reassurance on the response type when items is missing.
@redis/core-team i don't recall if we conceptually approved this one or not, PTAL.
p.s. a redis-doc PR is needed too.
Member
|
conceptually approved in a core-team meeting. |
Member
|
@CharlesChen888 sorry it took so long. |
zuiderkwast
pushed a commit
to redis/redis-doc
that referenced
this pull request
Jan 24, 2023
For PR redis/redis#11235, which adds the WITHSCORE option to command ZRANK and ZREVRANK.
madolson
pushed a commit
to madolson/redis
that referenced
this pull request
Apr 19, 2023
Add an option "withscores" to ZRANK and ZREVRANK. Add `[withscore]` option to both `zrank` and `zrevrank`, like this: ``` z[rev]rank key member [withscore] ```
enjoy-binbin
pushed a commit
to enjoy-binbin/redis
that referenced
this pull request
Jul 31, 2023
Add an option "withscores" to ZRANK and ZREVRANK. Add `[withscore]` option to both `zrank` and `zrevrank`, like this: ``` z[rev]rank key member [withscore] ```
This file contains hidden or 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
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.
Add an option "withscore" to ZRANK and ZREVRANK.
Add
[withscore]option to bothzrankandzrevrank, like this:discussion
To close #11111
The conclusion in #11111 is adding 2 options
[withscore]and[rev]tozranklike this:However, since we already have
zrevrankand it shares the same code withzrank, it would be quite inconvenient to add option[rev]tozrank, as this requires some ugly judgements in the code. Also it breaks the symmetry betweenzrankandzrevrank, in the aspects of both code implementation and command calling.