Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos: Stop nesting results in extra JSON object #34044

Merged
merged 3 commits into from
Jul 21, 2024

Conversation

roji
Copy link
Member

@roji roji commented Jun 20, 2024

@ajcvickers as discussed offline, here's a draft PR which changes the Cosmos NoSQL we generate to add VALUE for single-projection SelectExpressions; this stops wrapping results in an additional JSON object.

The tests to look at are NorthwindSelectQueryTestBase.Select_scalar (for scalar projections) and NorthwindSelectQueryTestBase.Select_customer_identity (for structural types); I've included all the information here and below. Note that we we also have array projections - both scalar and projections - which should work the same way; but there's a bit of extra trouble there which I'll be looking at next.

Closes #25527

@roji roji force-pushed the CosmosRemoveNesting branch 2 times, most recently from d02cf8e to 3070d21 Compare July 5, 2024 15:04
@ajcvickers ajcvickers force-pushed the CosmosRemoveNesting branch from 6932959 to 64f3652 Compare July 7, 2024 09:58
@roji roji removed the blocked label Jul 19, 2024
Copy link
Member Author

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajcvickers looks pretty good! 🐑 🇮🇹 on the shaper generation changes which I don't follow all the way, aside from that there's mainly the paging problem (I pushed a failing test) and a bunch of nits.

Once you're happy, you can approve and I'll merge.

@roji roji marked this pull request as ready for review July 19, 2024 21:13
@roji roji requested review from AndriySvyryd and maumar as code owners July 19, 2024 21:13
@roji
Copy link
Member Author

roji commented Jul 19, 2024

Also needs a rebase, which either you or I can do - let me know what you prefer.

Closes dotnet#25527

Co-Authored-By: Arthur Vickers <ajcvickers@hotmail.com>
@roji roji force-pushed the CosmosRemoveNesting branch from 31e8cbf to 37a90b8 Compare July 20, 2024 10:53
@roji roji merged commit d41ba67 into dotnet:main Jul 21, 2024
7 checks passed
@roji roji deleted the CosmosRemoveNesting branch July 21, 2024 11:26
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.

Cosmos: Stop nesting results in an extra JSON object
3 participants