Skip to content

fix: reject mixed vector and data queries regardless of batch order - #53

Merged
CahidArda merged 1 commit into
upstash:masterfrom
shafiktanbir:fix/mixed-query-batch-order
Nov 23, 2026
Merged

CahidArda merged 1 commit into
upstash:masterfrom
shafiktanbir:fix/mixed-query-batch-order

Conversation

@shafiktanbir

Copy link
Copy Markdown
Contributor

query_requests_to_payload tracks has_data_query and raises ClientError when a vector or sparse vector query follows a data query, but it never checks the reverse order. Passing a vector or sparse vector query before a data query bypasses the check, accepts the batch, and still returns is_vector_query = False.

Track has_vector_query as well so mixing data and vector/sparse_vector queries in any order raises ClientError.

Added unit tests in tests/core/test_query_payload.py covering [vector, data], [sparse_vector, data], [data, vector], and homogeneous batches.

@CahidArda
CahidArda merged commit b940f74 into upstash:master Nov 23, 2026
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