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

Support for infinity in sorted set commands params & results #981

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

maizy
Copy link
Contributor

@maizy maizy commented Jul 29, 2024

+inf, -inf are supported as a score in redis sorted set commands.

Infinity can be passed as a parameter to ZADD and received as a result from Z*WITHSCORE, ZSCORE, ZMSCORE, BZPOP* etc.

In the model we can map ±inf to Double.PositiveInfinity and Double.NegativeInfinity.

Strange thing: despite the fact that +inf is passed as a parameter with a plus at the end, it returns as inf without +.

It's a part of #352, which I'm going to implement later.

@maizy maizy requested a review from a team as a code owner July 29, 2024 20:04
@maizy maizy force-pushed the fix-sorted-set-score branch from c28e679 to 20bf49e Compare July 29, 2024 20:21
@maizy maizy force-pushed the fix-sorted-set-score branch from 20bf49e to 6becd0b Compare July 29, 2024 20:41
@mijicd mijicd merged commit d62e461 into zio:master Jul 30, 2024
12 checks passed
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.

2 participants