Skip to content

Commit

Permalink
Update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ranma42 committed Dec 23, 2024
1 parent 9dbbdc8 commit e0e91fd
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,14 +760,10 @@ public override async Task Project_single_element_from_collection_with_OrderBy_T
AssertSql(
"""
SELECT (
SELECT TOP(1) [o0].[CustomerID]
FROM (
SELECT TOP(1) [o].[CustomerID], [o].[OrderID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID]
) AS [o0]
ORDER BY [o0].[OrderID])
SELECT TOP(1) [o].[CustomerID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID])
FROM [Customers] AS [c]
""");
}
Expand Down Expand Up @@ -828,14 +824,10 @@ public override async Task Project_single_element_from_collection_with_OrderBy_T
AssertSql(
"""
SELECT (
SELECT TOP(1) [o0].[CustomerID]
FROM (
SELECT TOP(1) [o].[CustomerID], [o].[OrderID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID]
) AS [o0]
ORDER BY [o0].[OrderID])
SELECT TOP(1) [o].[CustomerID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID])
FROM [Customers] AS [c]
WHERE [c].[CustomerID] = N'ALFKI'
""");
Expand Down Expand Up @@ -869,14 +861,10 @@ public override async Task Project_single_element_from_collection_with_multiple_
AssertSql(
"""
SELECT (
SELECT TOP(1) [o0].[CustomerID]
FROM (
SELECT TOP(2) [o].[CustomerID], [o].[OrderID], [o].[OrderDate]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID], [o].[OrderDate] DESC
) AS [o0]
ORDER BY [o0].[OrderID], [o0].[OrderDate] DESC)
SELECT TOP(1) [o].[CustomerID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID], [o].[OrderDate] DESC)
FROM [Customers] AS [c]
""");
}
Expand All @@ -892,14 +880,10 @@ await base
AssertSql(
"""
SELECT (
SELECT TOP(1) [o0].[c]
FROM (
SELECT TOP(2) CAST(LEN([o].[CustomerID]) AS int) AS [c], [o].[OrderID], [o].[OrderDate]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID], [o].[OrderDate] DESC
) AS [o0]
ORDER BY [o0].[OrderID], [o0].[OrderDate] DESC)
SELECT TOP(1) CAST(LEN([o].[CustomerID]) AS int)
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID], [o].[OrderDate] DESC)
FROM [Customers] AS [c]
""");
}
Expand All @@ -911,14 +895,10 @@ public override async Task Project_single_element_from_collection_with_multiple_
AssertSql(
"""
SELECT (
SELECT TOP(1) [o0].[CustomerID]
FROM (
SELECT TOP(2) [o].[CustomerID], [o].[OrderDate]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[CustomerID], [o].[OrderDate] DESC
) AS [o0]
ORDER BY [o0].[CustomerID], [o0].[OrderDate] DESC)
SELECT TOP(1) [o].[CustomerID]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[CustomerID], [o].[OrderDate] DESC)
FROM [Customers] AS [c]
""");
}
Expand All @@ -930,15 +910,11 @@ public override async Task Project_single_element_from_collection_with_OrderBy_o
AssertSql(
"""
SELECT COALESCE((
SELECT TOP(1) [s].[OrderID]
FROM (
SELECT TOP(1) [o0].[OrderID], [p].[ProductName]
FROM [Order Details] AS [o0]
INNER JOIN [Products] AS [p] ON [o0].[ProductID] = [p].[ProductID]
WHERE [o].[OrderID] = [o0].[OrderID]
ORDER BY [p].[ProductName]
) AS [s]
ORDER BY [s].[ProductName]), 0)
SELECT TOP(1) [o0].[OrderID]
FROM [Order Details] AS [o0]
INNER JOIN [Products] AS [p] ON [o0].[ProductID] = [p].[ProductID]
WHERE [o].[OrderID] = [o0].[OrderID]
ORDER BY [p].[ProductName]), 0)
FROM [Orders] AS [o]
WHERE [o].[OrderID] < 10300
""");
Expand All @@ -953,17 +929,15 @@ public override async Task Project_single_element_from_collection_with_OrderBy_o
"""
SELECT [s0].[OrderID], [s0].[ProductID], [s0].[Discount], [s0].[Quantity], [s0].[UnitPrice]
FROM [Orders] AS [o]
OUTER APPLY (
SELECT TOP(1) [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[Quantity], [s].[UnitPrice]
LEFT JOIN (
SELECT [s].[OrderID], [s].[ProductID], [s].[Discount], [s].[Quantity], [s].[UnitPrice]
FROM (
SELECT TOP(1) [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[Quantity], [o0].[UnitPrice], [p].[ProductName]
SELECT [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[Quantity], [o0].[UnitPrice], ROW_NUMBER() OVER(PARTITION BY [o0].[OrderID] ORDER BY [p].[ProductName]) AS [row]
FROM [Order Details] AS [o0]
INNER JOIN [Products] AS [p] ON [o0].[ProductID] = [p].[ProductID]
WHERE [o].[OrderID] = [o0].[OrderID]
ORDER BY [p].[ProductName]
) AS [s]
ORDER BY [s].[ProductName]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [o].[OrderID] = [s0].[OrderID]
WHERE [o].[OrderID] < 10250
""");
}
Expand Down Expand Up @@ -1344,16 +1318,14 @@ public override async Task SelectMany_with_multiple_Take(bool async)
"""
SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate]
FROM [Customers] AS [c]
CROSS APPLY (
SELECT TOP(3) [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
INNER JOIN (
SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate]
FROM (
SELECT TOP(5) [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], ROW_NUMBER() OVER(PARTITION BY [o].[CustomerID] ORDER BY [o].[OrderID]) AS [row]
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]
ORDER BY [o].[OrderID]
) AS [o0]
ORDER BY [o0].[OrderID]
) AS [o1]
WHERE [o0].[row] <= 3
) AS [o1] ON [c].[CustomerID] = [o1].[CustomerID]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,17 +308,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name]
FROM [EntityOnes] AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name]
SELECT [e0].[Id], [e0].[Name], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] AS [j]
INNER JOIN [EntityOnes] AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,15 @@ public override async Task Skip_navigation_order_by_single_or_default(bool async
"""
SELECT [s0].[Id], [s0].[Name], [s0].[PeriodEnd], [s0].[PeriodStart]
FROM [EntityOnes] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [e]
OUTER APPLY (
SELECT TOP(1) [s].[Id], [s].[Name], [s].[PeriodEnd], [s].[PeriodStart]
LEFT JOIN (
SELECT [s].[Id], [s].[Name], [s].[PeriodEnd], [s].[PeriodStart], [s].[LeftId]
FROM (
SELECT TOP(1) [e0].[Id], [e0].[Name], [e0].[PeriodEnd], [e0].[PeriodStart]
SELECT [e0].[Id], [e0].[Name], [e0].[PeriodEnd], [e0].[PeriodStart], [j].[LeftId], ROW_NUMBER() OVER(PARTITION BY [j].[LeftId] ORDER BY [e0].[Id]) AS [row]
FROM [JoinOneSelfPayload] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [j]
INNER JOIN [EntityOnes] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [e0] ON [j].[RightId] = [e0].[Id]
WHERE [e].[Id] = [j].[LeftId]
ORDER BY [e0].[Id]
) AS [s]
ORDER BY [s].[Id]
) AS [s0]
WHERE [s].[row] <= 1
) AS [s0] ON [e].[Id] = [s0].[LeftId]
""");
}

Expand Down

0 comments on commit e0e91fd

Please sign in to comment.