dotnet / dotnet/efcore

Cosmos: Consider transforming to ReadItem even when a projection is present

Open
#34,163 1 comment 1 reaction 0 assignees View on GitHub
area-cosmos area-perf area-query
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

We currently only transform to ReadItem if the entire document is projected out; if the user composes a Select() to project only specific properties of the document, we don't transform. But transforming here is probably the right choice perf- and cost-wise, even if we end up transfering unneeded data from Cosmos to the client; this could be bad with very big documents, but that's likely to be rare.

It may be valid to say that if the user can simply perform the projection client-side, i.e. move the Select() out of the query, if they desire this behavior; also, if we transform even with projection, there really wouldn't be a way for a user to express a non-ReadItem SELECT with a projection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.