Adding support for vrange command.#3927
Merged
petyaslavova merged 3 commits intomasterfrom Feb 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the VRANGE command, which returns elements in a lexicographical range from a vector set. The implementation includes a new method in the VectorSetCommands class and comprehensive test coverage for both synchronous and asynchronous usage.
Changes:
- Added
vrangemethod to support lexicographical range queries on vector sets - Added comprehensive test suite covering basic functionality, count parameter, iteration patterns, edge cases, and special characters
- Tests verify both synchronous and async implementations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| redis/commands/vectorset/commands.py | Adds VRANGE_CMD constant and vrange() method implementation with support for lexicographical range queries and optional count parameter |
| tests/test_vsets.py | Adds 8 comprehensive test functions covering various VRANGE scenarios including basic ranges, count parameter, iteration, empty keys, special characters, single elements, lexicographical ordering, and numeric strings |
| tests/test_asyncio/test_vsets.py | Adds identical async versions of the 8 VRANGE test functions with proper await syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
elena-kolevska
approved these changes
Jan 30, 2026
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.
Description of change
Please provide a description of the change here.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.