Skip to content

Commit

Permalink
Update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ranma42 committed Jul 29, 2024
1 parent 9ece2f7 commit 4a9993e
Show file tree
Hide file tree
Showing 43 changed files with 3,201 additions and 1,029 deletions.
2 changes: 1 addition & 1 deletion src/EFCore.Relational/Query/SqlNullabilityProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@ private SqlExpression RewriteNullSemantics(
// - a == b || (a == null)
// - a == b || (b == null)
// as these expressions can use indexes on a and/or on b.
if (leftNullable && rightNullable || originallyNotEqual == bodyNotEqual)
if (leftNullable && rightNullable || (optimize && originallyNotEqual == bodyNotEqual))
{
// (a == b && (a != null && b != null)) || (a == null && b == null)
body = _sqlExpressionFactory.OrElse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,10 @@ SELECT MIN([o0].[HourlyRate])
FROM [Order] AS [o0]
WHERE [o0].[CustomerId] = [o].[CustomerId]) AS [CustomerMinHourlyRate], MIN([o].[HourlyRate]) AS [HourlyRate], COUNT(*) AS [Count]
FROM [Order] AS [o]
WHERE [o].[Number] <> N'A1' OR [o].[Number] IS NULL
WHERE CASE
WHEN [o].[Number] = N'A1' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit)
GROUP BY [o].[CustomerId], [o].[Number]
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ FROM [Employees] AS [e]
LEFT JOIN (
SELECT [d].[Id], [d].[Device], [d].[EmployeeId]
FROM [Devices] AS [d]
WHERE [d].[Device] <> N'foo' OR [d].[Device] IS NULL
WHERE CASE
WHEN [d].[Device] = N'foo' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit)
) AS [d0] ON [e].[Id] = [d0].[EmployeeId]
ORDER BY [e].[Id]
""");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ public override async Task Self_reference_in_query_filter_works()
FROM [EntitiesWithQueryFilterSelfReference] AS [e]
WHERE EXISTS (
SELECT 1
FROM [EntitiesWithQueryFilterSelfReference] AS [e0]) AND ([e].[Name] <> N'Foo' OR [e].[Name] IS NULL)
FROM [EntitiesWithQueryFilterSelfReference] AS [e0]) AND CASE
WHEN [e].[Name] = N'Foo' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit)
""",
//
"""
Expand All @@ -225,7 +228,10 @@ SELECT 1
FROM [EntitiesWithQueryFilterSelfReference] AS [e0]
WHERE EXISTS (
SELECT 1
FROM [EntitiesWithQueryFilterSelfReference] AS [e1])) AND ([e].[Name] <> N'Foo' OR [e].[Name] IS NULL)
FROM [EntitiesWithQueryFilterSelfReference] AS [e1])) AND CASE
WHEN [e].[Name] = N'Foo' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit)
""");
}

Expand All @@ -239,15 +245,21 @@ public override async Task Invoke_inside_query_filter_gets_correctly_evaluated_d
SELECT [e].[Id], [e].[Name], [e].[TenantId]
FROM [Entities] AS [e]
WHERE ([e].[Name] <> N'Foo' OR [e].[Name] IS NULL) AND [e].[TenantId] = @__ef_filter__p_0
WHERE CASE
WHEN [e].[Name] = N'Foo' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit) AND [e].[TenantId] = @__ef_filter__p_0
""",
//
"""
@__ef_filter__p_0='2'
SELECT [e].[Id], [e].[Name], [e].[TenantId]
FROM [Entities] AS [e]
WHERE ([e].[Name] <> N'Foo' OR [e].[Name] IS NULL) AND [e].[TenantId] = @__ef_filter__p_0
WHERE CASE
WHEN [e].[Name] = N'Foo' THEN CAST(0 AS bit)
ELSE CAST(1 AS bit)
END = CAST(1 AS bit) AND [e].[TenantId] = @__ef_filter__p_0
""");
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 4a9993e

Please sign in to comment.