Skip to content

Add ZRANK, ZREVRANK WITHSCORE#2531

Merged
monkey92t merged 10 commits into
redis:masterfrom
SoulPancake:zrank7.2
Apr 19, 2023
Merged

Add ZRANK, ZREVRANK WITHSCORE#2531
monkey92t merged 10 commits into
redis:masterfrom
SoulPancake:zrank7.2

Conversation

@SoulPancake

@SoulPancake SoulPancake commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

@SoulPancake SoulPancake changed the title Add support for zrankwithscore and zrevrankwithscore commands Add ZRANK, ZREVRANK WITHSCORE Apr 3, 2023
@SoulPancake

Copy link
Copy Markdown
Contributor Author

I think all 7.2 cmd tests would fail currently because of the test version, can we upgrade that?
@monkey92t @chayim @vmihailenco

@SoulPancake SoulPancake marked this pull request as ready for review April 12, 2023 13:17
@SoulPancake SoulPancake marked this pull request as draft April 12, 2023 13:39
@SoulPancake

Copy link
Copy Markdown
Contributor Author

@monkey92t Any idea why this is returning nil?

@monkey92t

Copy link
Copy Markdown
Collaborator

@monkey92t Any idea why this is returning nil?

According to the redis docs, the response may be Nil......

@SoulPancake

SoulPancake commented Apr 18, 2023

Copy link
Copy Markdown
Contributor Author

@monkey92t The response must be nil when the member or key doesn't exist in the sorted set right
Never mind I found my bug

@SoulPancake SoulPancake marked this pull request as ready for review April 18, 2023 11:07
Comment thread command.go Outdated
@monkey92t

Copy link
Copy Markdown
Collaborator

In the RESP3 protocol, score uses the Float:

ZRANK myzset "three" withscore
*2
:2
,3

@SoulPancake

Copy link
Copy Markdown
Contributor Author

@monkey92t I have made the changes, Can you take a look?

Signed-off-by: monkey92t <golang@88.com>
monkey92t
monkey92t previously approved these changes Apr 19, 2023
Signed-off-by: monkey92t <golang@88.com>
@monkey92t monkey92t merged commit 6ecbcf6 into redis:master Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ZREVRANK: Added the optional WITHSCORE argument. Support ZRANK: Added the optional WITHSCORE argument.

2 participants