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 'WithScore' option both to 'zRank' and 'zRevRank' commands #824

Merged
merged 6 commits into from
Apr 15, 2023

Conversation

drmarjanovic
Copy link
Collaborator

@drmarjanovic drmarjanovic commented Apr 15, 2023

Description:

Part of #804

  • Updated docker-compose to use Redis 7.2.
  • Provide WithScore flag.
  • Provided zRankWithScore and zRevRankWithScore.
  • Adapted documentation.
  • Used WithScoresInput instead of ArbitraryValueInput[String]().
  • Replaced STRALGO LCS with LCS. Removed support for strings. Changed API. Reason: "Remove STRALGO command, preserve LCS a standalone command which only works on keys". More info here.

@drmarjanovic drmarjanovic requested a review from a team as a code owner April 15, 2023 14:30
mijicd
mijicd previously approved these changes Apr 15, 2023
Copy link
Member

@mijicd mijicd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor remark

@@ -82,6 +82,8 @@ trait SortedSets {

type MemberScores[+M] = Chunk[MemberScore[M]]

sealed case class RankScore(score: Double, rank: Long)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sealed case class RankScore(score: Double, rank: Long)
sealed case class RankScore(rank: Long, score: Double)

We should consider introducing newtypes (maybe through zio-prelude) to represent things like Rank consistently and "cost-free". That's a topic for a separate PR, though.

@drmarjanovic drmarjanovic merged commit 617e6a2 into zio:master Apr 15, 2023
@drmarjanovic drmarjanovic deleted the task-support-withscore-flag branch April 15, 2023 16:54
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