Skip to content

Clean up container management in Cosmos#33898

Merged
roji merged 1 commit intodotnet:mainfrom
roji:RemoveContainerFromSelect
Jun 5, 2024
Merged

Clean up container management in Cosmos#33898
roji merged 1 commit intodotnet:mainfrom
roji:RemoveContainerFromSelect

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Jun 4, 2024

NOTE: This PR is based on top of #33895, review 2nd commit only

The Cosmos container is currently extracted from the entity type and stored inside SelectExpression - but it doesn't belong there. For one thing, there can be multiple SelectExpressions in a single query (e.g. subqueries), but queries can only ever reference a single container. There was also some hacky stuff around owned entities, which aren't considered to have a (direct) container, but SelectExpression required one.

Removed the container concept from SelectExpression altogether, and moved it to CosmosQueryCompilationContext (which is scoped to the entire query) - like the partition key.

@roji roji requested a review from a team June 4, 2024 13:20
@roji roji force-pushed the RemoveContainerFromSelect branch from ee967c1 to b3d5982 Compare June 5, 2024 08:13
@roji roji merged commit 0773a30 into dotnet:main Jun 5, 2024
@roji roji deleted the RemoveContainerFromSelect branch June 5, 2024 08:13
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