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

Add ZRANK, ZREVRANK WITHSCORE #2531

Merged
merged 10 commits into from
Apr 19, 2023
Merged

Add ZRANK, ZREVRANK WITHSCORE #2531

merged 10 commits into from
Apr 19, 2023

Conversation

SoulPancake
Copy link
Contributor

@SoulPancake SoulPancake commented Apr 3, 2023

@SoulPancake SoulPancake changed the title Add support for zrankwithscore and zrevrankwithscore commands Add ZRANK, ZREVRANK WITHSCORE Apr 3, 2023
@SoulPancake
Copy link
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
Contributor Author

@monkey92t Any idea why this is returning nil?

@monkey92t
Copy link
Collaborator

@monkey92t Any idea why this is returning nil?

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

@SoulPancake
Copy link
Contributor Author

SoulPancake commented Apr 18, 2023

@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
command.go Outdated Show resolved Hide resolved
@monkey92t
Copy link
Collaborator

In the RESP3 protocol, score uses the Float:

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

@SoulPancake
Copy link
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
2 participants