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: Implement query pipeline #16138

Merged
merged 1 commit into from
Jun 19, 2019
Merged

Cosmos: Implement query pipeline #16138

merged 1 commit into from
Jun 19, 2019

Conversation

smitpatel
Copy link
Member

No description provided.

@@ -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))");
Copy link
Member Author

Choose a reason for hiding this comment

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

🎉

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

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

👍

@smitpatel smitpatel marked this pull request as ready for review June 19, 2019 02:51
@smitpatel
Copy link
Member Author

This is ready for review. Others can also review if interested. We are translating a lot more Sql to server now.

{
IsDistinct = true;

ClearOrdering();
Copy link
Member

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?

Copy link
Member Author

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);
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@smitpatel smitpatel merged commit 674a991 into master Jun 19, 2019
@ghost ghost deleted the smit/cosmosquery branch June 19, 2019 16:39
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.

2 participants