Enabling support for missing sorted set commands#5379
Open
pratheep-kumar wants to merge 4 commits intovalkey-io:mainfrom
Open
Enabling support for missing sorted set commands#5379pratheep-kumar wants to merge 4 commits intovalkey-io:mainfrom
pratheep-kumar wants to merge 4 commits intovalkey-io:mainfrom
Conversation
Signed-off-by: Pratheep Kumar <pratheepkumar0403@gmail.com>
Signed-off-by: Pratheep Kumar <pratheepkumar0403@gmail.com>
Signed-off-by: Pratheep Kumar <pratheepkumar0403@gmail.com>
911c61f to
53946c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added support for 5 sorted set range commands in
glide-corerequest_type:ZRANGEBYLEX,ZRANGEBYSCORE,ZREVRANGE,ZREVRANGEBYLEX, andZREVRANGEBYSCORE.Issue link
This Pull Request is linked to issue (URL): #5380
Features / Behaviour Changes
This PR adds Rust-level support for the following sorted set commands:
ZRANGEBYLEX- Returns members in a sorted set within a lexicographical rangeZRANGEBYSCORE- Returns members in a sorted set within a score rangeZREVRANGE- Returns members in a sorted set by index (in reverse order)ZREVRANGEBYLEX- Returns members in a sorted set within a lexicographical range (in reverse order)ZREVRANGEBYSCORE- Returns members in a sorted set within a score range (in reverse order)These commands were already defined as enum variants but were missing their implementations in the command mapping layer.
Implementation
Key changes in
glide-core/src/request_type.rs:Added command implementations in
get_command()method (lines 986-990):Added protobuf mappings in
From<ProtobufRequestType>implementation (lines 590-594):Both mappings were strategically placed after
ZRangeStoreto maintain logical grouping with other sorted set range commands.Limitations
glide-core(Rust) layerTesting
cargo buildcompleted successfullyChecklist
Before submitting the PR make sure the following are checked:
make *-linttargets) and Prettier has been run (make prettier-fix).