-
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: Implement query pipeline #16138
Conversation
@@ -1284,7 +1284,7 @@ public override async Task Where_bool_member_equals_constant(bool isAsync) | |||
AssertSql( | |||
@"SELECT c | |||
FROM root c | |||
WHERE (c[""Discriminator""] = ""Product"")"); | |||
WHERE ((c[""Discriminator""] = ""Product"") AND (c[""Discontinued""] = true))"); |
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.
🎉
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.
👍
88fadd2
to
359b29d
Compare
This is ready for review. Others can also review if interested. We are translating a lot more Sql to server now. |
src/EFCore.Cosmos/Query/Pipeline/CosmosQueryableMethodTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Pipeline/CosmosShapedQueryCompilingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Pipeline/CosmosSqlTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Pipeline/CosmosSqlTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
{ | ||
IsDistinct = true; | ||
|
||
ClearOrdering(); |
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.
Why do we need to clear orderings?
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.
Distinct contract does not specify if inner orderings will be preserved. (e.g. if you use HashSet to compute distinct values). Hence we clear orderings when applying Distinct. It has been in place since long time in relational so I just carried over.
@@ -179,6 +179,7 @@ public override int GetHashCode() | |||
var hash = new HashCode(); | |||
hash.Add(base.GetHashCode()); | |||
hash.Add(FunctionName); | |||
hash.Add(IsNiladic); |
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.
🎉
359b29d
to
3dbe96e
Compare
No description provided.