Skip to content

Adding support for vrange command.#3927

Merged
petyaslavova merged 3 commits intomasterfrom
ps_add_vrange_command_support
Feb 2, 2026
Merged

Adding support for vrange command.#3927
petyaslavova merged 3 commits intomasterfrom
ps_add_vrange_command_support

Conversation

@petyaslavova
Copy link
Copy Markdown
Collaborator

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:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 vrange method 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.

Comment thread redis/commands/vectorset/commands.py
@petyaslavova petyaslavova added the feature New feature label Feb 2, 2026
@petyaslavova petyaslavova merged commit faf917a into master Feb 2, 2026
40 checks passed
@petyaslavova petyaslavova deleted the ps_add_vrange_command_support branch February 2, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants