Skip to content

Commit

Permalink
Update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ranma42 committed Jun 30, 2024
1 parent 4e1a381 commit afcfba2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,7 @@ public override async Task Null_propagation_optimization5(bool async)
"""
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
FROM [Gears] AS [g]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1036,10 +1033,7 @@ public override async Task Null_propagation_optimization6(bool async)
"""
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank]
FROM [Gears] AS [g]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1050,10 +1044,7 @@ public override async Task Select_null_propagation_optimization7(bool async)
// issue #16050
AssertSql(
"""
SELECT CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN [g].[LeaderNickname] + [g].[LeaderNickname]
ELSE NULL
END
SELECT [g].[LeaderNickname] + [g].[LeaderNickname]
FROM [Gears] AS [g]
""");
}
Expand Down Expand Up @@ -1243,10 +1234,7 @@ public override async Task Select_null_propagation_works_for_multiple_navigation

AssertSql(
"""
SELECT CASE
WHEN [c].[Name] IS NOT NULL THEN [c].[Name]
ELSE NULL
END
SELECT [c].[Name]
FROM [Tags] AS [t]
LEFT JOIN [Gears] AS [g] ON [t].[GearNickName] = [g].[Nickname] AND [t].[GearSquadId] = [g].[SquadId]
LEFT JOIN [Tags] AS [t0] ON ([g].[Nickname] = [t0].[GearNickName] OR ([g].[Nickname] IS NULL AND [t0].[GearNickName] IS NULL)) AND ([g].[SquadId] = [t0].[GearSquadId] OR ([g].[SquadId] IS NULL AND [t0].[GearSquadId] IS NULL))
Expand Down Expand Up @@ -3658,10 +3646,7 @@ public override async Task Select_null_conditional_with_inheritance(bool async)

AssertSql(
"""
SELECT CASE
WHEN [f].[CommanderName] IS NOT NULL THEN [f].[CommanderName]
ELSE NULL
END
SELECT [f].[CommanderName]
FROM [Factions] AS [f]
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4507,10 +4507,7 @@ public override async Task Is_not_null_optimizes_unary_op(bool async)

AssertSql(
"""
SELECT CASE
WHEN [e].[NullableIntA] IS NOT NULL THEN ~[e].[NullableIntA]
ELSE NULL
END
SELECT ~[e].[NullableIntA]
FROM [Entities1] AS [e]
""");
}
Expand All @@ -4521,10 +4518,7 @@ public override async Task Is_not_null_optimizes_binary_op(bool async)

AssertSql(
"""
SELECT CASE
WHEN [e].[NullableIntA] IS NOT NULL AND [e].[NullableIntB] IS NOT NULL THEN [e].[NullableIntA] + [e].[NullableIntB]
ELSE NULL
END
SELECT [e].[NullableIntA] + [e].[NullableIntB]
FROM [Entities1] AS [e]
""");
}
Expand All @@ -4535,10 +4529,7 @@ public override async Task Is_not_null_optimizes_binary_op_with_partial_checks(b

AssertSql(
"""
SELECT CASE
WHEN [e].[NullableStringA] IS NOT NULL AND [e].[NullableStringB] IS NOT NULL THEN [e].[NullableStringA] + [e].[NullableStringB] + COALESCE([e].[NullableStringC], N'')
ELSE NULL
END
SELECT [e].[NullableStringA] + [e].[NullableStringB] + COALESCE([e].[NullableStringC], N'')
FROM [Entities1] AS [e]
""");
}
Expand All @@ -4549,13 +4540,7 @@ public override async Task Is_not_null_optimizes_binary_op_with_nested_checks(bo

AssertSql(
"""
SELECT CASE
WHEN [e].[NullableStringA] IS NOT NULL THEN CASE
WHEN [e].[NullableStringB] IS NOT NULL THEN [e].[NullableStringA] + [e].[NullableStringB]
ELSE NULL
END
ELSE NULL
END
SELECT [e].[NullableStringA] + [e].[NullableStringB]
FROM [Entities1] AS [e]
""");
}
Expand All @@ -4567,7 +4552,7 @@ public override async Task Is_not_null_optimizes_binary_op_with_mixed_checks(boo
AssertSql(
"""
SELECT CASE
WHEN [e].[NullableStringA] IS NOT NULL AND [e].[BoolA] = CAST(1 AS bit) THEN [e].[NullableStringA] + COALESCE([e].[NullableStringB], N'')
WHEN [e].[BoolA] = CAST(1 AS bit) THEN [e].[NullableStringA] + COALESCE([e].[NullableStringB], N'')
ELSE NULL
END
FROM [Entities1] AS [e]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1418,10 +1418,7 @@ UNION ALL
SELECT [o].[Nickname], [o].[SquadId], [o].[AssignedCityName], [o].[CityOfBirthName], [o].[FullName], [o].[HasSoulPatch], [o].[LeaderNickname], [o].[LeaderSquadId], [o].[Rank], N'Officer' AS [Discriminator]
FROM [Officers] AS [o]
) AS [u]
WHERE CASE
WHEN [u].[LeaderNickname] IS NOT NULL THEN CAST(LEN([u].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([u].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1440,10 +1437,7 @@ UNION ALL
SELECT [o].[Nickname], [o].[SquadId], [o].[AssignedCityName], [o].[CityOfBirthName], [o].[FullName], [o].[HasSoulPatch], [o].[LeaderNickname], [o].[LeaderSquadId], [o].[Rank], N'Officer' AS [Discriminator]
FROM [Officers] AS [o]
) AS [u]
WHERE CASE
WHEN [u].[LeaderNickname] IS NOT NULL THEN CAST(LEN([u].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([u].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1454,10 +1448,7 @@ public override async Task Select_null_propagation_optimization7(bool async)
// issue #16050
AssertSql(
"""
SELECT CASE
WHEN [u].[LeaderNickname] IS NOT NULL THEN [u].[LeaderNickname] + [u].[LeaderNickname]
ELSE NULL
END
SELECT [u].[LeaderNickname] + [u].[LeaderNickname]
FROM (
SELECT [g].[LeaderNickname]
FROM [Gears] AS [g]
Expand Down Expand Up @@ -1749,10 +1740,7 @@ public override async Task Select_null_propagation_works_for_multiple_navigation

AssertSql(
"""
SELECT CASE
WHEN [c].[Name] IS NOT NULL THEN [c].[Name]
ELSE NULL
END
SELECT [c].[Name]
FROM [Tags] AS [t]
LEFT JOIN (
SELECT [g].[Nickname], [g].[SquadId]
Expand Down Expand Up @@ -4871,10 +4859,7 @@ public override async Task Select_null_conditional_with_inheritance(bool async)

AssertSql(
"""
SELECT CASE
WHEN [l].[CommanderName] IS NOT NULL THEN [l].[CommanderName]
ELSE NULL
END
SELECT [l].[CommanderName]
FROM [LocustHordes] AS [l]
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,10 +1236,7 @@ WHEN [o].[Nickname] IS NOT NULL THEN N'Officer'
END AS [Discriminator]
FROM [Gears] AS [g]
LEFT JOIN [Officers] AS [o] ON [g].[Nickname] = [o].[Nickname] AND [g].[SquadId] = [o].[SquadId]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1255,10 +1252,7 @@ WHEN [o].[Nickname] IS NOT NULL THEN N'Officer'
END AS [Discriminator]
FROM [Gears] AS [g]
LEFT JOIN [Officers] AS [o] ON [g].[Nickname] = [o].[Nickname] AND [g].[SquadId] = [o].[SquadId]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand All @@ -1269,10 +1263,7 @@ public override async Task Select_null_propagation_optimization7(bool async)
// issue #16050
AssertSql(
"""
SELECT CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN [g].[LeaderNickname] + [g].[LeaderNickname]
ELSE NULL
END
SELECT [g].[LeaderNickname] + [g].[LeaderNickname]
FROM [Gears] AS [g]
""");
}
Expand Down Expand Up @@ -1480,10 +1471,7 @@ public override async Task Select_null_propagation_works_for_multiple_navigation

AssertSql(
"""
SELECT CASE
WHEN [c].[Name] IS NOT NULL THEN [c].[Name]
ELSE NULL
END
SELECT [c].[Name]
FROM [Tags] AS [t]
LEFT JOIN (
SELECT [g].[Nickname], [g].[SquadId]
Expand Down Expand Up @@ -4163,10 +4151,7 @@ public override async Task Select_null_conditional_with_inheritance(bool async)

AssertSql(
"""
SELECT CASE
WHEN [l].[CommanderName] IS NOT NULL THEN [l].[CommanderName]
ELSE NULL
END
SELECT [l].[CommanderName]
FROM [Factions] AS [f]
LEFT JOIN [LocustHordes] AS [l] ON [f].[Id] = [l].[Id]
WHERE [l].[Id] IS NOT NULL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1602,10 +1602,7 @@ public override async Task Null_propagation_optimization6(bool async)
"""
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[PeriodEnd], [g].[PeriodStart], [g].[Rank]
FROM [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand Down Expand Up @@ -4038,10 +4035,7 @@ public override async Task Null_propagation_optimization5(bool async)
"""
SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[PeriodEnd], [g].[PeriodStart], [g].[Rank]
FROM [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g]
WHERE CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN CAST(LEN([g].[LeaderNickname]) AS int)
ELSE NULL
END = 5
WHERE CAST(LEN([g].[LeaderNickname]) AS int) = 5
""");
}

Expand Down Expand Up @@ -5173,10 +5167,7 @@ public override async Task Select_null_propagation_optimization7(bool async)

AssertSql(
"""
SELECT CASE
WHEN [g].[LeaderNickname] IS NOT NULL THEN [g].[LeaderNickname] + [g].[LeaderNickname]
ELSE NULL
END
SELECT [g].[LeaderNickname] + [g].[LeaderNickname]
FROM [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g]
""");
}
Expand Down Expand Up @@ -5840,10 +5831,7 @@ public override async Task Select_null_propagation_works_for_multiple_navigation

AssertSql(
"""
SELECT CASE
WHEN [c].[Name] IS NOT NULL THEN [c].[Name]
ELSE NULL
END
SELECT [c].[Name]
FROM [Tags] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [t]
LEFT JOIN [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g] ON [t].[GearNickName] = [g].[Nickname] AND [t].[GearSquadId] = [g].[SquadId]
LEFT JOIN [Tags] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [t0] ON ([g].[Nickname] = [t0].[GearNickName] OR ([g].[Nickname] IS NULL AND [t0].[GearNickName] IS NULL)) AND ([g].[SquadId] = [t0].[GearSquadId] OR ([g].[SquadId] IS NULL AND [t0].[GearSquadId] IS NULL))
Expand Down Expand Up @@ -7883,10 +7871,7 @@ public override async Task Select_null_conditional_with_inheritance(bool async)

AssertSql(
"""
SELECT CASE
WHEN [f].[CommanderName] IS NOT NULL THEN [f].[CommanderName]
ELSE NULL
END
SELECT [f].[CommanderName]
FROM [Factions] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [f]
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,10 +1063,7 @@ public override async Task Null_propagation_optimization6(bool async)
"""
SELECT "g"."Nickname", "g"."SquadId", "g"."AssignedCityName", "g"."CityOfBirthName", "g"."Discriminator", "g"."FullName", "g"."HasSoulPatch", "g"."LeaderNickname", "g"."LeaderSquadId", "g"."Rank"
FROM "Gears" AS "g"
WHERE CASE
WHEN "g"."LeaderNickname" IS NOT NULL THEN length("g"."LeaderNickname")
ELSE NULL
END = 5
WHERE length("g"."LeaderNickname") = 5
""");
}

Expand Down Expand Up @@ -3203,10 +3200,7 @@ public override async Task Select_null_propagation_works_for_multiple_navigation

AssertSql(
"""
SELECT CASE
WHEN "c"."Name" IS NOT NULL THEN "c"."Name"
ELSE NULL
END
SELECT "c"."Name"
FROM "Tags" AS "t"
LEFT JOIN "Gears" AS "g" ON "t"."GearNickName" = "g"."Nickname" AND "t"."GearSquadId" = "g"."SquadId"
LEFT JOIN "Tags" AS "t0" ON ("g"."Nickname" = "t0"."GearNickName" OR ("g"."Nickname" IS NULL AND "t0"."GearNickName" IS NULL)) AND ("g"."SquadId" = "t0"."GearSquadId" OR ("g"."SquadId" IS NULL AND "t0"."GearSquadId" IS NULL))
Expand Down Expand Up @@ -5818,10 +5812,7 @@ public override async Task Select_null_propagation_optimization7(bool async)

AssertSql(
"""
SELECT CASE
WHEN "g"."LeaderNickname" IS NOT NULL THEN "g"."LeaderNickname" || "g"."LeaderNickname"
ELSE NULL
END
SELECT "g"."LeaderNickname" || "g"."LeaderNickname"
FROM "Gears" AS "g"
""");
}
Expand Down Expand Up @@ -6469,10 +6460,7 @@ public override async Task Select_null_conditional_with_inheritance(bool async)

AssertSql(
"""
SELECT CASE
WHEN "f"."CommanderName" IS NOT NULL THEN "f"."CommanderName"
ELSE NULL
END
SELECT "f"."CommanderName"
FROM "Factions" AS "f"
""");
}
Expand Down Expand Up @@ -7550,10 +7538,7 @@ public override async Task Null_propagation_optimization5(bool async)
"""
SELECT "g"."Nickname", "g"."SquadId", "g"."AssignedCityName", "g"."CityOfBirthName", "g"."Discriminator", "g"."FullName", "g"."HasSoulPatch", "g"."LeaderNickname", "g"."LeaderSquadId", "g"."Rank"
FROM "Gears" AS "g"
WHERE CASE
WHEN "g"."LeaderNickname" IS NOT NULL THEN length("g"."LeaderNickname")
ELSE NULL
END = 5
WHERE length("g"."LeaderNickname") = 5
""");
}

Expand Down

0 comments on commit afcfba2

Please sign in to comment.