Skip to content

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

@roji

Description

@roji

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions