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

Update SQL baselines #24459

Merged
merged 1 commit into from
Mar 23, 2021
Merged

Conversation

smitpatel
Copy link
Member

Part of #17337

@smitpatel smitpatel marked this pull request as draft March 19, 2021 23:16
@smitpatel smitpatel force-pushed the smit/sqlupdates branch 2 times, most recently from 05e8b58 to ad89d28 Compare March 20, 2021 05:13
}

public override async Task SelectMany_with_navigation_and_Distinct(bool async)
{
await base.SelectMany_with_navigation_and_Distinct(async);

AssertSql(
@"SELECT [l].[Id], [l].[Date], [l].[Name], [t].[Id], [t].[OneToOne_Required_PK_Date], [t].[Level1_Optional_Id], [t].[Level1_Required_Id], [t].[Level2_Name], [t].[OneToMany_Optional_Inverse2Id], [t].[OneToMany_Required_Inverse2Id], [t].[OneToOne_Optional_PK_Inverse2Id], [t0].[Id], [t0].[OneToOne_Required_PK_Date], [t0].[Level1_Optional_Id], [t0].[Level1_Required_Id], [t0].[Level2_Name], [t0].[OneToMany_Optional_Inverse2Id], [t0].[OneToMany_Required_Inverse2Id], [t0].[OneToOne_Optional_PK_Inverse2Id], [t0].[Id0]
@"SELECT [l].[Id], [l].[Date], [l].[Name], [t].[Id], [t0].[Id], [t0].[OneToOne_Required_PK_Date], [t0].[Level1_Optional_Id], [t0].[Level1_Required_Id], [t0].[Level2_Name], [t0].[OneToMany_Optional_Inverse2Id], [t0].[OneToMany_Required_Inverse2Id], [t0].[OneToOne_Optional_PK_Inverse2Id], [t0].[Id0]
Copy link
Member Author

Choose a reason for hiding this comment

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

Valid change, Distinct over entity type preserving Id as identifier

FROM [Customers] AS [c]
LEFT JOIN (
SELECT [t].[OrderID], [t].[ProductID], [o].[OrderID] AS [OrderID0], [t].[OrderID] AS [OrderID1], [t].[ProductID] AS [ProductID0], [o].[CustomerID]
SELECT [t].[OrderID], [t].[ProductID], [o].[OrderID] AS [OrderID0], [o].[CustomerID]
Copy link
Member Author

Choose a reason for hiding this comment

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

Valid change. Earlier we did not match the columns correctly.

@@ -1595,7 +1595,7 @@ public override async Task Projecting_after_navigation_and_distinct(bool async)
FROM [Orders] AS [o0]
WHERE [o0].[OrderID] IN (10248, 10249, 10250) AND (([t].[CustomerID] = [o0].[CustomerID]) OR ([t].[CustomerID] IS NULL AND [o0].[CustomerID] IS NULL))
) AS [t0]
ORDER BY [t].[CustomerID], [t].[Address], [t].[City], [t].[CompanyName], [t].[ContactName], [t].[ContactTitle], [t].[Country], [t].[Fax], [t].[Phone], [t].[PostalCode], [t].[Region], [t0].[OrderID]");
ORDER BY [t].[CustomerID], [t0].[OrderID]");
Copy link
Member Author

Choose a reason for hiding this comment

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

Valid change, since the PK is inside Distinct projection, we retain identifier rather than using whole projection.

@smitpatel smitpatel marked this pull request as ready for review March 23, 2021 00:22
@smitpatel smitpatel merged commit dd7277f into smit/ABriefRevisitToGraphTheory Mar 23, 2021
@smitpatel smitpatel deleted the smit/sqlupdates branch March 23, 2021 16:05
This pull request was closed.
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