Skip to content

Commit

Permalink
Update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ranma42 committed Feb 7, 2025
1 parent 372493d commit a28b546
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3980,7 +3980,7 @@ public override async Task Nested_object_constructed_from_group_key_properties(b

AssertSql(
"""
SELECT [l].[Id], [l].[Name], [l].[Date], [l0].[Id], [l1].[Name], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], COALESCE(SUM(CAST(LEN([l].[Name]) AS int)), 0) AS [Aggregate]
SELECT [l].[Id], [l].[Name], [l].[Date], [l0].[Id], [l1].[Name], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], ISNULL(SUM(CAST(LEN([l].[Name]) AS int)), 0) AS [Aggregate]
FROM [LevelOne] AS [l]
LEFT JOIN [LevelTwo] AS [l0] ON [l].[Id] = [l0].[Level1_Optional_Id]
LEFT JOIN [LevelTwo] AS [l1] ON [l].[Id] = [l1].[Level1_Required_Id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3980,7 +3980,7 @@ public override async Task Nested_object_constructed_from_group_key_properties(b

AssertSql(
"""
SELECT [l].[Id], [l].[Name], [l].[Date], [l0].[Id], [l1].[Name], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], COALESCE(SUM(CAST(LEN([l].[Name]) AS int)), 0) AS [Aggregate]
SELECT [l].[Id], [l].[Name], [l].[Date], [l0].[Id], [l1].[Name], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], ISNULL(SUM(CAST(LEN([l].[Name]) AS int)), 0) AS [Aggregate]
FROM [LevelOne] AS [l]
LEFT JOIN [LevelTwo] AS [l0] ON [l].[Id] = [l0].[Level1_Optional_Id]
LEFT JOIN [LevelTwo] AS [l1] ON [l].[Id] = [l1].[Level1_Required_Id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ public override async Task Nested_object_constructed_from_group_key_properties(b

AssertSql(
"""
SELECT [s].[Id], [s].[Name], [s].[Date], [s].[InnerId] AS [Id], [s].[Level2_Name0] AS [Name], [s].[OneToOne_Required_PK_Date] AS [Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], COALESCE(SUM(CAST(LEN([s].[Name]) AS int)), 0) AS [Aggregate]
SELECT [s].[Id], [s].[Name], [s].[Date], [s].[InnerId] AS [Id], [s].[Level2_Name0] AS [Name], [s].[OneToOne_Required_PK_Date] AS [Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], ISNULL(SUM(CAST(LEN([s].[Name]) AS int)), 0) AS [Aggregate]
FROM (
SELECT [l].[Id], [l].[Date], [l].[Name], [l1].[OneToOne_Required_PK_Date], [l1].[Level1_Optional_Id], [l1].[Level1_Required_Id], [l3].[Level2_Name] AS [Level2_Name0], CASE
WHEN [l1].[OneToOne_Required_PK_Date] IS NOT NULL AND [l1].[Level1_Required_Id] IS NOT NULL AND [l1].[OneToMany_Required_Inverse2Id] IS NOT NULL THEN [l1].[Id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ public override async Task Nested_object_constructed_from_group_key_properties(b

AssertSql(
"""
SELECT [s].[Id], [s].[Name], [s].[Date], [s].[InnerId] AS [Id], [s].[Level2_Name0] AS [Name], [s].[OneToOne_Required_PK_Date] AS [Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], COALESCE(SUM(CAST(LEN([s].[Name]) AS int)), 0) AS [Aggregate]
SELECT [s].[Id], [s].[Name], [s].[Date], [s].[InnerId] AS [Id], [s].[Level2_Name0] AS [Name], [s].[OneToOne_Required_PK_Date] AS [Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], ISNULL(SUM(CAST(LEN([s].[Name]) AS int)), 0) AS [Aggregate]
FROM (
SELECT [l].[Id], [l].[Date], [l].[Name], [l1].[OneToOne_Required_PK_Date], [l1].[Level1_Optional_Id], [l1].[Level1_Required_Id], [l3].[Level2_Name] AS [Level2_Name0], CASE
WHEN [l1].[OneToOne_Required_PK_Date] IS NOT NULL AND [l1].[Level1_Required_Id] IS NOT NULL AND [l1].[OneToMany_Required_Inverse2Id] IS NOT NULL THEN [l1].[Id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3475,7 +3475,7 @@ public override async Task ToString_nullable_enum_property_projection(bool async
SELECT CASE [w].[AmmunitionType]
WHEN 1 THEN N'Cartridge'
WHEN 2 THEN N'Shell'
ELSE COALESCE(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
ELSE ISNULL(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
END
FROM [Weapons] AS [w]
""");
Expand Down Expand Up @@ -3504,7 +3504,7 @@ FROM [Weapons] AS [w]
WHERE CASE [w].[AmmunitionType]
WHEN 1 THEN N'Cartridge'
WHEN 2 THEN N'Shell'
ELSE COALESCE(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
ELSE ISNULL(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
END LIKE N'%Cart%'
""");
}
Expand Down Expand Up @@ -4883,7 +4883,7 @@ public override async Task Select_subquery_projecting_single_constant_int(bool a

AssertSql(
"""
SELECT [s].[Name], COALESCE((
SELECT [s].[Name], ISNULL((
SELECT TOP(1) 42
FROM [Gears] AS [g]
WHERE [s].[Id] = [g].[SquadId] AND [g].[HasSoulPatch] = CAST(1 AS bit)), 0) AS [Gear]
Expand Down Expand Up @@ -4911,7 +4911,7 @@ public override async Task Select_subquery_projecting_single_constant_bool(bool

AssertSql(
"""
SELECT [s].[Name], COALESCE((
SELECT [s].[Name], ISNULL((
SELECT TOP(1) CAST(1 AS bit)
FROM [Gears] AS [g]
WHERE [s].[Id] = [g].[SquadId] AND [g].[HasSoulPatch] = CAST(1 AS bit)), CAST(0 AS bit)) AS [Gear]
Expand Down Expand Up @@ -5546,7 +5546,7 @@ public override async Task String_concat_on_various_types(bool async)

AssertSql(
"""
SELECT N'HasSoulPatch ' + CAST([g].[HasSoulPatch] AS nvarchar(max)) + N' HasSoulPatch' AS [HasSoulPatch], N'Rank ' + CAST([g].[Rank] AS nvarchar(max)) + N' Rank' AS [Rank], N'SquadId ' + CAST([g].[SquadId] AS nvarchar(max)) + N' SquadId' AS [SquadId], N'Rating ' + COALESCE(CAST([m].[Rating] AS nvarchar(max)), N'') + N' Rating' AS [Rating], N'Timeline ' + CAST([m].[Timeline] AS nvarchar(max)) + N' Timeline' AS [Timeline]
SELECT N'HasSoulPatch ' + CAST([g].[HasSoulPatch] AS nvarchar(max)) + N' HasSoulPatch' AS [HasSoulPatch], N'Rank ' + CAST([g].[Rank] AS nvarchar(max)) + N' Rank' AS [Rank], N'SquadId ' + CAST([g].[SquadId] AS nvarchar(max)) + N' SquadId' AS [SquadId], N'Rating ' + ISNULL(CAST([m].[Rating] AS nvarchar(max)), N'') + N' Rating' AS [Rating], N'Timeline ' + CAST([m].[Timeline] AS nvarchar(max)) + N' Timeline' AS [Timeline]
FROM [Gears] AS [g]
CROSS JOIN [Missions] AS [m]
ORDER BY [g].[Nickname], [m].[Id]
Expand Down Expand Up @@ -6616,7 +6616,7 @@ public override async Task Complex_GroupBy_after_set_operator(bool async)

AssertSql(
"""
SELECT [u].[Name], [u].[Count], COALESCE(SUM([u].[Count]), 0) AS [Sum]
SELECT [u].[Name], [u].[Count], ISNULL(SUM([u].[Count]), 0) AS [Sum]
FROM (
SELECT [c].[Name], (
SELECT COUNT(*)
Expand All @@ -6642,7 +6642,7 @@ public override async Task Complex_GroupBy_after_set_operator_using_result_selec

AssertSql(
"""
SELECT [u].[Name], [u].[Count], COALESCE(SUM([u].[Count]), 0) AS [Sum]
SELECT [u].[Name], [u].[Count], ISNULL(SUM([u].[Count]), 0) AS [Sum]
FROM (
SELECT [c].[Name], (
SELECT COUNT(*)
Expand Down Expand Up @@ -9062,7 +9062,7 @@ public override async Task Set_operator_with_navigation_in_projection_groupby_ag
AssertSql(
"""
SELECT [s].[Name], (
SELECT COALESCE(SUM(CAST(LEN([c].[Location]) AS int)), 0)
SELECT ISNULL(SUM(CAST(LEN([c].[Location]) AS int)), 0)
FROM [Gears] AS [g2]
INNER JOIN [Squads] AS [s0] ON [g2].[SquadId] = [s0].[Id]
INNER JOIN [Cities] AS [c] ON [g2].[CityOfBirthName] = [c].[Name]
Expand Down Expand Up @@ -9146,7 +9146,7 @@ LEFT JOIN (
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId], ROW_NUMBER() OVER(PARTITION BY [w].[OwnerFullName] ORDER BY [w].[Id]) AS [row]
FROM [Weapons] AS [w]
) AS [w0]
WHERE [w0].[row] <= COALESCE((
WHERE [w0].[row] <= ISNULL((
SELECT [n].[value]
FROM OPENJSON(@numbers) WITH ([value] int '$') AS [n]
ORDER BY [n].[value]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ public override async Task Sum_over_uncorrelated_subquery(bool async)
// #34256: rewrite query to avoid "Cannot perform an aggregate function on an expression containing an aggregate or a subquery"
AssertSql(
"""
SELECT COALESCE(SUM([s].[value]), 0)
SELECT ISNULL(SUM([s].[value]), 0)
FROM [Customers] AS [c]
CROSS JOIN (
SELECT COUNT(*) AS [value]
Expand Down Expand Up @@ -2721,7 +2721,7 @@ public override async Task Project_constant_Sum(bool async)

AssertSql(
"""
SELECT COALESCE(SUM(1), 0)
SELECT ISNULL(SUM(1), 0)
FROM [Employees] AS [e]
""");
}
Expand Down Expand Up @@ -3081,7 +3081,7 @@ public override async Task Contains_inside_Sum_without_GroupBy(bool async)
"""
@cities='["London","Berlin"]' (Size = 4000)

SELECT COALESCE(SUM([s].[value]), 0)
SELECT ISNULL(SUM([s].[value]), 0)
FROM [Customers] AS [c]
OUTER APPLY (
SELECT CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public override async Task GroupBy_aggregate_projecting_conditional_expression(b
"""
SELECT [o].[OrderDate] AS [Key], CASE
WHEN COUNT(*) = 0 THEN 1
ELSE COALESCE(SUM(CASE
ELSE ISNULL(SUM(CASE
WHEN [o].[OrderID] % 2 = 0 THEN 1
ELSE 0
END), 0) / COUNT(*)
Expand Down Expand Up @@ -1939,7 +1939,7 @@ public override async Task GroupBy_Sum_constant(bool async)

AssertSql(
"""
SELECT COALESCE(SUM(1), 0)
SELECT ISNULL(SUM(1), 0)
FROM [Orders] AS [o]
GROUP BY [o].[CustomerID]
""");
Expand Down Expand Up @@ -2699,7 +2699,7 @@ public override async Task GroupBy_aggregate_followed_by_another_GroupBy_aggrega

AssertSql(
"""
SELECT [o1].[Key0] AS [Key], COALESCE(SUM([o1].[Count]), 0) AS [Count]
SELECT [o1].[Key0] AS [Key], ISNULL(SUM([o1].[Count]), 0) AS [Count]
FROM (
SELECT [o0].[Count], 1 AS [Key0]
FROM (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,9 @@ public override async Task GroupJoin_aggregate_anonymous_key_selectors(bool asyn
await base.GroupJoin_aggregate_anonymous_key_selectors(async);

AssertSql(
"""
"""
SELECT [c].[CustomerID], (
SELECT COALESCE(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
SELECT ISNULL(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
FROM [Orders] AS [o]
WHERE [c].[City] IS NOT NULL AND [c].[CustomerID] = [o].[CustomerID] AND [c].[City] = N'London') AS [Sum]
FROM [Customers] AS [c]
Expand All @@ -610,9 +610,9 @@ public override async Task GroupJoin_aggregate_anonymous_key_selectors2(bool asy
await base.GroupJoin_aggregate_anonymous_key_selectors2(async);

AssertSql(
"""
"""
SELECT [c].[CustomerID], (
SELECT COALESCE(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
SELECT ISNULL(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID] AND 1996 = DATEPART(year, [o].[OrderDate])) AS [Sum]
FROM [Customers] AS [c]
Expand All @@ -624,9 +624,9 @@ public override async Task GroupJoin_aggregate_anonymous_key_selectors_one_argum
await base.GroupJoin_aggregate_anonymous_key_selectors_one_argument(async);

AssertSql(
"""
"""
SELECT [c].[CustomerID], (
SELECT COALESCE(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
SELECT ISNULL(SUM(CAST(LEN([o].[CustomerID]) AS int)), 0)
FROM [Orders] AS [o]
WHERE [c].[CustomerID] = [o].[CustomerID]) AS [Sum]
FROM [Customers] AS [c]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public override async Task KeylessEntity_groupby(bool async)

AssertSql(
"""
SELECT [m].[City] AS [Key], COUNT(*) AS [Count], COALESCE(SUM(CAST(LEN([m].[Address]) AS int)), 0) AS [Sum]
SELECT [m].[City] AS [Key], COUNT(*) AS [Count], ISNULL(SUM(CAST(LEN([m].[Address]) AS int)), 0) AS [Sum]
FROM (
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c]
) AS [m]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2864,7 +2864,7 @@ public override async Task Coalesce_Correct_Multiple_Same_TypeMapping(bool async

AssertSql(
"""
SELECT COALESCE(CAST([e].[ReportsTo] AS bigint) + CAST(1 AS bigint), CAST([e].[ReportsTo] AS bigint) + CAST(2 AS bigint), CAST([e].[ReportsTo] AS bigint) + CAST(3 AS bigint))
SELECT ISNULL(ISNULL(CAST([e].[ReportsTo] AS bigint) + CAST(1 AS bigint), CAST([e].[ReportsTo] AS bigint) + CAST(2 AS bigint)), CAST([e].[ReportsTo] AS bigint) + CAST(3 AS bigint))
FROM [Employees] AS [e]
ORDER BY [e].[EmployeeID]
""");
Expand Down Expand Up @@ -7020,7 +7020,7 @@ public override async Task Subquery_with_navigation_inside_inline_collection(boo
SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
FROM [Customers] AS [c]
WHERE (
SELECT COALESCE(SUM([v].[Value]), 0)
SELECT ISNULL(SUM([v].[Value]), 0)
FROM (VALUES (CAST(100 AS int)), ((
SELECT COUNT(*)
FROM [Orders] AS [o]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public override async Task Select_count_plus_sum(bool async)
AssertSql(
"""
SELECT (
SELECT COALESCE(SUM(CAST([o0].[Quantity] AS int)), 0)
SELECT ISNULL(SUM(CAST([o0].[Quantity] AS int)), 0)
FROM [Order Details] AS [o0]
WHERE [o].[OrderID] = [o0].[OrderID]) + (
SELECT COUNT(*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public override async Task Select_nested_collection_multi_level4(bool async)

AssertSql(
"""
SELECT COALESCE((
SELECT ISNULL((
SELECT TOP(1) (
SELECT COUNT(*)
FROM [Order Details] AS [o0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public override async Task Navigation_rewrite_on_owned_collection_with_compositi

AssertSql(
"""
SELECT COALESCE((
SELECT ISNULL((
SELECT TOP(1) CAST([o0].[Id] ^ 42 AS bit)
FROM [Order] AS [o0]
WHERE [o].[Id] = [o0].[ClientId]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4639,7 +4639,7 @@ public override async Task ToString_nullable_enum_property_projection(bool async
SELECT CASE [w].[AmmunitionType]
WHEN 1 THEN N'Cartridge'
WHEN 2 THEN N'Shell'
ELSE COALESCE(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
ELSE ISNULL(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
END
FROM [Weapons] AS [w]
""");
Expand Down Expand Up @@ -4668,7 +4668,7 @@ FROM [Weapons] AS [w]
WHERE CASE [w].[AmmunitionType]
WHEN 1 THEN N'Cartridge'
WHEN 2 THEN N'Shell'
ELSE COALESCE(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
ELSE ISNULL(CAST([w].[AmmunitionType] AS nvarchar(max)), N'')
END LIKE N'%Cart%'
""");
}
Expand Down Expand Up @@ -6651,7 +6651,7 @@ public override async Task Select_subquery_projecting_single_constant_int(bool a

AssertSql(
"""
SELECT [s].[Name], COALESCE((
SELECT [s].[Name], ISNULL((
SELECT TOP(1) 42
FROM (
SELECT [g].[SquadId], [g].[HasSoulPatch]
Expand Down Expand Up @@ -6691,7 +6691,7 @@ public override async Task Select_subquery_projecting_single_constant_bool(bool

AssertSql(
"""
SELECT [s].[Name], COALESCE((
SELECT [s].[Name], ISNULL((
SELECT TOP(1) CAST(1 AS bit)
FROM (
SELECT [g].[SquadId], [g].[HasSoulPatch]
Expand Down Expand Up @@ -7515,7 +7515,7 @@ public override async Task String_concat_on_various_types(bool async)

AssertSql(
"""
SELECT N'HasSoulPatch ' + CAST([u].[HasSoulPatch] AS nvarchar(max)) + N' HasSoulPatch' AS [HasSoulPatch], N'Rank ' + CAST([u].[Rank] AS nvarchar(max)) + N' Rank' AS [Rank], N'SquadId ' + CAST([u].[SquadId] AS nvarchar(max)) + N' SquadId' AS [SquadId], N'Rating ' + COALESCE(CAST([m].[Rating] AS nvarchar(max)), N'') + N' Rating' AS [Rating], N'Timeline ' + CAST([m].[Timeline] AS nvarchar(max)) + N' Timeline' AS [Timeline]
SELECT N'HasSoulPatch ' + CAST([u].[HasSoulPatch] AS nvarchar(max)) + N' HasSoulPatch' AS [HasSoulPatch], N'Rank ' + CAST([u].[Rank] AS nvarchar(max)) + N' Rank' AS [Rank], N'SquadId ' + CAST([u].[SquadId] AS nvarchar(max)) + N' SquadId' AS [SquadId], N'Rating ' + ISNULL(CAST([m].[Rating] AS nvarchar(max)), N'') + N' Rating' AS [Rating], N'Timeline ' + CAST([m].[Timeline] AS nvarchar(max)) + N' Timeline' AS [Timeline]
FROM (
SELECT [g].[Nickname], [g].[SquadId], [g].[HasSoulPatch], [g].[Rank]
FROM [Gears] AS [g]
Expand Down Expand Up @@ -8810,7 +8810,7 @@ public override async Task Complex_GroupBy_after_set_operator(bool async)

AssertSql(
"""
SELECT [u1].[Name], [u1].[Count], COALESCE(SUM([u1].[Count]), 0) AS [Sum]
SELECT [u1].[Name], [u1].[Count], ISNULL(SUM([u1].[Count]), 0) AS [Sum]
FROM (
SELECT [c].[Name], (
SELECT COUNT(*)
Expand Down Expand Up @@ -8848,7 +8848,7 @@ public override async Task Complex_GroupBy_after_set_operator_using_result_selec

AssertSql(
"""
SELECT [u1].[Name], [u1].[Count], COALESCE(SUM([u1].[Count]), 0) AS [Sum]
SELECT [u1].[Name], [u1].[Count], ISNULL(SUM([u1].[Count]), 0) AS [Sum]
FROM (
SELECT [c].[Name], (
SELECT COUNT(*)
Expand Down Expand Up @@ -12077,7 +12077,7 @@ public override async Task Set_operator_with_navigation_in_projection_groupby_ag
AssertSql(
"""
SELECT [s].[Name], (
SELECT COALESCE(SUM(CAST(LEN([c].[Location]) AS int)), 0)
SELECT ISNULL(SUM(CAST(LEN([c].[Location]) AS int)), 0)
FROM (
SELECT [g2].[SquadId], [g2].[CityOfBirthName]
FROM [Gears] AS [g2]
Expand Down Expand Up @@ -12203,7 +12203,7 @@ LEFT JOIN (
SELECT [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId], ROW_NUMBER() OVER(PARTITION BY [w].[OwnerFullName] ORDER BY [w].[Id]) AS [row]
FROM [Weapons] AS [w]
) AS [w0]
WHERE [w0].[row] <= COALESCE((
WHERE [w0].[row] <= ISNULL((
SELECT [n].[value]
FROM OPENJSON(@numbers) WITH ([value] int '$') AS [n]
ORDER BY [n].[value]
Expand Down
Loading

0 comments on commit a28b546

Please sign in to comment.