Skip to content

Support Z[REV]RANK command with score option - #3364

Merged
sazzad16 merged 3 commits into
redis:masterfrom
yangbodong22011:feature-zrank-zrevrank-withscore
Apr 21, 2023
Merged

sazzad16 merged 3 commits into
redis:masterfrom
yangbodong22011:feature-zrank-zrevrank-withscore

Conversation

@yangbodong22011

@yangbodong22011 yangbodong22011 commented Apr 10, 2023 •

Copy link
Copy Markdown
Contributor

fixes #3349
fixes #3350

Since our Tuple class doesn't support <Long, Double> pairs, I chose KeyValue, but it's worth discussing.

Or we can consider changing the current Tuple to Tuple<K,V>.

@codecov-commenter

codecov-commenter commented Apr 10, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 40.00% and project coverage change: -0.12 ⚠️

Comparison is base (8b60f29) 67.30% compared to head (937ec6e) 67.19%.

❗ Current head 937ec6e differs from pull request most recent head c15a778. Consider uploading reports for the commit c15a778 to get more accurate results

πŸ“£ This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3364      +/-   ##
============================================
- Coverage     67.30%   67.19%   -0.12%     
- Complexity     4722     4725       +3     
============================================
  Files           269      269              
  Lines         15239    15273      +34     
  Branches        963      964       +1     
============================================
+ Hits          10256    10262       +6     
- Misses         4563     4589      +26     
- Partials        420      422       +2     
Impacted Files Coverage Ξ”
...ava/redis/clients/jedis/MultiNodePipelineBase.java 21.53% <0.00%> (-0.10%) ⬇️
src/main/java/redis/clients/jedis/Pipeline.java 17.02% <0.00%> (-0.08%) ⬇️
...main/java/redis/clients/jedis/TransactionBase.java 11.83% <0.00%> (-0.06%) ⬇️
...lients/jedis/commands/SortedSetBinaryCommands.java 100.00% <ΓΈ> (ΓΈ)
...edis/clients/jedis/commands/SortedSetCommands.java 100.00% <ΓΈ> (ΓΈ)
...edis/commands/SortedSetPipelineBinaryCommands.java 0.00% <ΓΈ> (ΓΈ)
...ents/jedis/commands/SortedSetPipelineCommands.java 0.00% <ΓΈ> (ΓΈ)
.../main/java/redis/clients/jedis/CommandObjects.java 84.83% <50.00%> (-0.11%) ⬇️
src/main/java/redis/clients/jedis/Jedis.java 84.76% <50.00%> (-0.14%) ⬇️
...rc/main/java/redis/clients/jedis/UnifiedJedis.java 74.27% <50.00%> (-0.10%) ⬇️
... and 2 more

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

β˜” View full report in Codecov by Sentry.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

@sazzad16

sazzad16 commented Apr 10, 2023 •

Copy link
Copy Markdown
Contributor

we can consider changing the current Tuple to Tuple<K,V>.

This is one of the best thing we can do. But sadly it'd be a breaking change 😞

Since our Tuple class doesn't support <Long, Double> pairs, I chose KeyValue, but it's worth discussing.

All I can think of is RankTuple which would be exactly Tuple but with rank instead of element. Given the circumstances, I'm okay with KeyValue for Jedis 4.

@dengliming WDYT?

@sazzad16 sazzad16 added this to the 4.4.0 milestone Apr 20, 2023
@sazzad16
sazzad16 self-requested a review April 20, 2023 18:42
@sazzad16 sazzad16 changed the title Support z[rev]rank with score command Support Z[REV]RANK command with SCORE option Apr 20, 2023
@sazzad16 sazzad16 changed the title Support Z[REV]RANK command with SCORE option Support Z[REV]RANK command with score option Apr 20, 2023
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
@yangbodong22011
yangbodong22011 force-pushed the feature-zrank-zrevrank-withscore branch from b19a384 to c15a778 Compare April 21, 2023 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

3 participants