dapr / dapr/components-contrib

Feature Request: CosmosDB State Store Query to support partitioned queries

Open
#3,244 6 comments 0 reactions 0 assignees View on GitHub
kind/enhancement triaged/resolved
Dominant language
Go
Stars
602
Forks
580
Avg merge
4d 9h
Merged PRs (30d)
6

Description

## Describe the feature

~~When saving data through the DaprClient using the partitionKey metadata, everything is stored fine and is partitioned correctly.~~
When querying data using the DaprClient with a partitionKey metadata Dictionary, It would be great if only the records having the specified partitionKey are returned.

Here's an example setup (and also some screenshots): https://github.com/DSpirit/dapr-cosmosdb-partitioning

## Maintainer Edit:
This is not a bug but intended behavior. The description above needs updating so it is clear that this is a feature enhancement request to add support for partitioned queries. Today the CosmosDB State Store Query API implementation intentionally performs cross-partition queries exclusively.

## Release Note

RELEASE NOTE: **ADD** Support for partition queries in CosmosDB StateStore

Contributor guide

Open the contributing guide

Research direction

Start with the CosmosDB State Store Query API implementation and the DaprClient query path, then compare them with the partitioning example linked in the issue. Done means partitionKey metadata limits results to the requested partition while the existing cross-partition query behavior remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.