Skip to content

[release/9.0] Fix Cosmos enum partition keys#34922

Merged
AndriySvyryd merged 1 commit into
dotnet:release/9.0from
roji:CosmosEnumPk
Oct 17, 2024
Merged

[release/9.0] Fix Cosmos enum partition keys#34922
AndriySvyryd merged 1 commit into
dotnet:release/9.0from
roji:CosmosEnumPk

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Oct 16, 2024

Fixes #34911

Description
Among the many changes done to the Cosmos provider in 9.0, the logic for handling partition keys was rewritten; the new logic fails to handle enum constants properly - these require special handling because of how the C# compiler produces expression trees around enums.

Customer impact
When an enum property is used as a partition key, queries filtering on that property fail to execute (this is expected to be a relatively common scenario).

How found
Customer reported on 9.0.0-rc.2

Regression
Yes

Testing
Added.

Risk
Very low.

@AndriySvyryd AndriySvyryd merged commit 4147693 into dotnet:release/9.0 Oct 17, 2024
@roji roji deleted the CosmosEnumPk branch October 17, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants