Cosmos: Stop nesting results in extra JSON object#34044
Merged
roji merged 3 commits intodotnet:mainfrom Jul 21, 2024
Merged
Conversation
d02cf8e to
3070d21
Compare
alandryz83
approved these changes
Jul 6, 2024
6932959 to
64f3652
Compare
roji
commented
Jul 19, 2024
Member
Author
There was a problem hiding this comment.
@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.
Member
Author
|
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>
31e8cbf to
37a90b8
Compare
ajcvickers
approved these changes
Jul 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@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