-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Properly handle nested owned types on owned collections #18461
Conversation
e9ed02e
to
4f89ce5
Compare
4f89ce5
to
f70c3b6
Compare
f70c3b6
to
4d082f8
Compare
src/EFCore.Cosmos/Query/Internal/CosmosSqlTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
This should also check NodeType of UnaryExpression. (Assuming only convert is allowed) Refers to: src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs:193 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = False) |
This assumes that projectionBinding is always mapped by Index. Is that always true? Can it not be projection mapping? #WontFix Refers to: src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs:195 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = True) |
Should there be type safety check? Or we have invariant in pipeline for this? #WontFix Refers to: src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs:201 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = True) |
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
Also check nodeType? Refers to: src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.CosmosProjectionBindingRemovingExpressionVisitor.cs:101 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = True) |
Another invariant? #Resolved Refers to: src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.CosmosProjectionBindingRemovingExpressionVisitor.cs:91 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = False) |
...mosShapedQueryCompilingExpressionVisitor.CosmosProjectionBindingRemovingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...mosShapedQueryCompilingExpressionVisitor.CosmosProjectionBindingRemovingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
For now Member would only be called in an Index projectionBinding, I think we would only need projection mapping if we allow querying unmapped properties unless you can think of a different case off top of your head. In reply to: 545169128 [](ancestors = 545169128) Refers to: src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs:195 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = True) |
This is an invariant - we always need to cast the projection to ValueBuffer and we only support Member on entity projection. I guess we could throw a better exception message if it's not, but I would need to think to come up with a test case. In reply to: 545171073 [](ancestors = 545171073) Refers to: src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs:201 in 4d082f8. [](commit_id = 4d082f8, deletion_comment = True) |
if (method.DeclaringType == typeof(Enumerable) | ||
|| method.DeclaringType == typeof(EnumerableExtensions)) | ||
{ | ||
if (method.Name == nameof(Enumerable.Select) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge Ifs.
Remove EnumerableExtensions
Consolidate Enumerable methods info Print the declaring type name for static method calls Fixes #18265
b7a957a
to
5a0b029
Compare
Consolidate Enumerable methods info
Print the declaring type name for static method calls
Fixes #18265