Skip to content

Commit 3991a1e

Browse files
committed
Feedback.
1 parent 0de3590 commit 3991a1e

14 files changed

+36
-52
lines changed

src/EFCore.Relational/Query/SqlNullabilityProcessor.cs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class SqlNullabilityProcessor : ExpressionVisitor
2424
private readonly List<ColumnExpression> _nonNullableColumns;
2525
private readonly List<ColumnExpression> _nullValueColumns;
2626
private readonly ISqlExpressionFactory _sqlExpressionFactory;
27+
private readonly Dictionary<SqlParameterExpression, List<SqlParameterExpression>> _parametersForValues;
2728
private bool _canCache;
2829

2930
/// <summary>
@@ -42,6 +43,7 @@ public SqlNullabilityProcessor(
4243
_sqlExpressionFactory = dependencies.SqlExpressionFactory;
4344
_nonNullableColumns = [];
4445
_nullValueColumns = [];
46+
_parametersForValues = [];
4547
ParameterValues = null!;
4648
}
4749

@@ -80,6 +82,7 @@ public virtual Expression Process(
8082
_canCache = true;
8183
_nonNullableColumns.Clear();
8284
_nullValueColumns.Clear();
85+
_parametersForValues.Clear();
8386
ParameterValues = parameterValues;
8487

8588
var result = Visit(queryExpression);
@@ -129,22 +132,29 @@ protected override Expression VisitExtension(Expression node)
129132
valuesParameter.TypeMapping.ElementTypeMapping is not null,
130133
"valuesParameter.TypeMapping.ElementTypeMapping is not null");
131134
var typeMapping = (RelationalTypeMapping)valuesParameter.TypeMapping.ElementTypeMapping;
132-
var values = (IEnumerable?)ParameterValues[valuesParameter.Name] ?? Array.Empty<object>();
135+
var values = ((IEnumerable?)ParameterValues[valuesParameter.Name])?.Cast<object>().ToList() ?? [];
133136

134137
var processedValues = new List<RowValueExpression>();
135138

136139
if (!valuesParameter.ShouldBeConstantized
137140
&& (ParameterizedCollectionTranslationMode is null or PCTM.ParameterizeExpanded))
138141
{
139-
foreach (var value in values)
142+
var parameters = _parametersForValues.GetOrAddNew(valuesParameter);
143+
for (var i = 0; i < values.Count; i++)
140144
{
141-
var parameterName = Uniquifier.Uniquify(valuesParameter.Name, ParameterValues, int.MaxValue);
142-
ParameterValues.Add(parameterName, value);
143-
var parameterExpression = new SqlParameterExpression(parameterName, value?.GetType() ?? typeof(object), typeMapping);
145+
// Create parameter for value if we didn't create it yet,
146+
// otherwise reuse it.
147+
if (parameters.Count <= i)
148+
{
149+
var parameterName = Uniquifier.Uniquify(valuesParameter.Name, ParameterValues, int.MaxValue);
150+
ParameterValues.Add(parameterName, values[i]);
151+
var parameterExpression = new SqlParameterExpression(parameterName, values[i]?.GetType() ?? typeof(object), typeMapping);
152+
parameters.Add(parameterExpression);
153+
}
144154
processedValues.Add(
145155
new RowValueExpression(
146156
[
147-
parameterExpression,
157+
parameters[i],
148158
]));
149159
}
150160
}

src/EFCore.SqlServer/Query/Internal/SqlServerSqlNullabilityProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected override Expression VisitExtension(Expression node)
166166
case ValuesExpression { ValuesParameter: SqlParameterExpression valuesParameter } valuesExpression
167167
when ParameterizedCollectionTranslationMode is null or PCTM.ParameterizeExpanded:
168168
{
169-
var values = ((IEnumerable?)ParameterValues[valuesParameter.Name])?.ToList<object>() ?? [];
169+
var values = ((IEnumerable?)ParameterValues[valuesParameter.Name])?.Cast<object>().ToList() ?? [];
170170
if (values.Count > 2098)
171171
{
172172
DoNotCache();

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,8 +2332,6 @@ public override async Task Collection_projection_over_GroupBy_over_parameter(boo
23322332
"""
23332333
@validIds1='L1 01' (Size = 4000)
23342334
@validIds2='L1 02' (Size = 4000)
2335-
@validIds3='L1 01' (Size = 4000)
2336-
@validIds4='L1 02' (Size = 4000)
23372335
23382336
SELECT [l1].[Date], [l2].[Id]
23392337
FROM (
@@ -2345,7 +2343,7 @@ GROUP BY [l].[Date]
23452343
LEFT JOIN (
23462344
SELECT [l0].[Id], [l0].[Date]
23472345
FROM [LevelOne] AS [l0]
2348-
WHERE [l0].[Name] IN (@validIds3, @validIds4)
2346+
WHERE [l0].[Name] IN (@validIds1, @validIds2)
23492347
) AS [l2] ON [l1].[Date] = [l2].[Date]
23502348
ORDER BY [l1].[Date]
23512349
""");

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,8 +3012,6 @@ public override async Task Collection_projection_over_GroupBy_over_parameter(boo
30123012
"""
30133013
@validIds1='L1 01' (Size = 4000)
30143014
@validIds2='L1 02' (Size = 4000)
3015-
@validIds3='L1 01' (Size = 4000)
3016-
@validIds4='L1 02' (Size = 4000)
30173015
30183016
SELECT [l1].[Date], [l2].[Id]
30193017
FROM (
@@ -3025,7 +3023,7 @@ GROUP BY [l].[Date]
30253023
LEFT JOIN (
30263024
SELECT [l0].[Id], [l0].[Date]
30273025
FROM [Level1] AS [l0]
3028-
WHERE [l0].[Name] IN (@validIds3, @validIds4)
3026+
WHERE [l0].[Name] IN (@validIds1, @validIds2)
30293027
) AS [l2] ON [l1].[Date] = [l2].[Date]
30303028
ORDER BY [l1].[Date]
30313029
""");

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3756,8 +3756,6 @@ ORDER BY [l].[Date]
37563756
"""
37573757
@validIds3='L1 01' (Size = 4000)
37583758
@validIds4='L1 02' (Size = 4000)
3759-
@validIds5='L1 01' (Size = 4000)
3760-
@validIds6='L1 02' (Size = 4000)
37613759
37623760
SELECT [l5].[Id], [l4].[Date]
37633761
FROM (
@@ -3769,7 +3767,7 @@ GROUP BY [l].[Date]
37693767
INNER JOIN (
37703768
SELECT [l3].[Id], [l3].[Date]
37713769
FROM [LevelOne] AS [l3]
3772-
WHERE [l3].[Name] IN (@validIds5, @validIds6)
3770+
WHERE [l3].[Name] IN (@validIds3, @validIds4)
37733771
) AS [l5] ON [l4].[Date] = [l5].[Date]
37743772
ORDER BY [l4].[Date]
37753773
""");

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ public override async Task Include_collection_OrderBy_list_does_not_contains(boo
631631
AssertSql(
632632
"""
633633
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
634-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
635634
@p='1'
636635
637636
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -643,7 +642,7 @@ END AS [c]
643642
FROM [Customers] AS [c]
644643
WHERE [c].[CustomerID] LIKE N'A%'
645644
ORDER BY CASE
646-
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
645+
WHEN [c].[CustomerID] <> @list1 THEN CAST(1 AS bit)
647646
ELSE CAST(0 AS bit)
648647
END
649648
OFFSET @p ROWS
@@ -1357,7 +1356,6 @@ public override async Task Include_collection_OrderBy_list_contains(bool async)
13571356
AssertSql(
13581357
"""
13591358
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
1360-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
13611359
@p='1'
13621360
13631361
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -1369,7 +1367,7 @@ END AS [c]
13691367
FROM [Customers] AS [c]
13701368
WHERE [c].[CustomerID] LIKE N'A%'
13711369
ORDER BY CASE
1372-
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
1370+
WHEN [c].[CustomerID] = @list1 THEN CAST(1 AS bit)
13731371
ELSE CAST(0 AS bit)
13741372
END
13751373
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeNoTrackingQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ public override async Task Include_collection_OrderBy_list_does_not_contains(boo
170170
AssertSql(
171171
"""
172172
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
173-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
174173
@p='1'
175174
176175
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -182,7 +181,7 @@ END AS [c]
182181
FROM [Customers] AS [c]
183182
WHERE [c].[CustomerID] LIKE N'A%'
184183
ORDER BY CASE
185-
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
184+
WHEN [c].[CustomerID] <> @list1 THEN CAST(1 AS bit)
186185
ELSE CAST(0 AS bit)
187186
END
188187
OFFSET @p ROWS
@@ -447,7 +446,6 @@ public override async Task Include_collection_OrderBy_list_contains(bool async)
447446
AssertSql(
448447
"""
449448
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
450-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
451449
@p='1'
452450
453451
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -459,7 +457,7 @@ END AS [c]
459457
FROM [Customers] AS [c]
460458
WHERE [c].[CustomerID] LIKE N'A%'
461459
ORDER BY CASE
462-
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
460+
WHEN [c].[CustomerID] = @list1 THEN CAST(1 AS bit)
463461
ELSE CAST(0 AS bit)
464462
END
465463
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,6 @@ public override async Task Include_collection_OrderBy_list_contains(bool async)
15591559
AssertSql(
15601560
"""
15611561
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
1562-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
15631562
@p='1'
15641563
15651564
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -1571,7 +1570,7 @@ END AS [c]
15711570
FROM [Customers] AS [c]
15721571
WHERE [c].[CustomerID] LIKE N'A%'
15731572
ORDER BY CASE
1574-
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
1573+
WHEN [c].[CustomerID] = @list1 THEN CAST(1 AS bit)
15751574
ELSE CAST(0 AS bit)
15761575
END
15771576
OFFSET @p ROWS
@@ -1588,7 +1587,6 @@ public override async Task Include_collection_OrderBy_list_does_not_contains(boo
15881587
AssertSql(
15891588
"""
15901589
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
1591-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
15921590
@p='1'
15931591
15941592
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -1600,7 +1598,7 @@ END AS [c]
16001598
FROM [Customers] AS [c]
16011599
WHERE [c].[CustomerID] LIKE N'A%'
16021600
ORDER BY CASE
1603-
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
1601+
WHEN [c].[CustomerID] <> @list1 THEN CAST(1 AS bit)
16041602
ELSE CAST(0 AS bit)
16051603
END
16061604
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7015,26 +7015,22 @@ public override async Task Parameter_collection_Contains_with_projection_and_ord
70157015

70167016
AssertSql(
70177017
"""
7018-
@ids3='10248'
7019-
@ids4='10249'
70207018
@ids1='10248'
70217019
@ids2='10249'
7022-
@ids5='10248'
7023-
@ids6='10249'
70247020
70257021
SELECT [o].[Quantity] AS [Key], (
70267022
SELECT MAX([o1].[OrderDate])
70277023
FROM [Order Details] AS [o0]
70287024
INNER JOIN [Orders] AS [o1] ON [o0].[OrderID] = [o1].[OrderID]
7029-
WHERE [o0].[OrderID] IN (@ids3, @ids4) AND [o].[Quantity] = [o0].[Quantity]) AS [MaxTimestamp]
7025+
WHERE [o0].[OrderID] IN (@ids1, @ids2) AND [o].[Quantity] = [o0].[Quantity]) AS [MaxTimestamp]
70307026
FROM [Order Details] AS [o]
70317027
WHERE [o].[OrderID] IN (@ids1, @ids2)
70327028
GROUP BY [o].[Quantity]
70337029
ORDER BY (
70347030
SELECT MAX([o1].[OrderDate])
70357031
FROM [Order Details] AS [o0]
70367032
INNER JOIN [Orders] AS [o1] ON [o0].[OrderID] = [o1].[OrderID]
7037-
WHERE [o0].[OrderID] IN (@ids5, @ids6) AND [o].[Quantity] = [o0].[Quantity])
7033+
WHERE [o0].[OrderID] IN (@ids1, @ids2) AND [o].[Quantity] = [o0].[Quantity])
70387034
""");
70397035
}
70407036

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ OFFSET @p ROWS
174174
//
175175
"""
176176
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
177-
@list3='ALFKI' (Size = 5) (DbType = StringFixedLength)
178177
@p='1'
179178
180179
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID]
@@ -186,7 +185,7 @@ END AS [c]
186185
FROM [Customers] AS [c]
187186
WHERE [c].[CustomerID] LIKE N'A%'
188187
ORDER BY CASE
189-
WHEN [c].[CustomerID] <> @list3 THEN CAST(1 AS bit)
188+
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
190189
ELSE CAST(0 AS bit)
191190
END, [c].[CustomerID]
192191
OFFSET @p ROWS
@@ -1164,7 +1163,6 @@ OFFSET @p ROWS
11641163
//
11651164
"""
11661165
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
1167-
@list3='ALFKI' (Size = 5) (DbType = StringFixedLength)
11681166
@p='1'
11691167
11701168
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID]
@@ -1176,7 +1174,7 @@ END AS [c]
11761174
FROM [Customers] AS [c]
11771175
WHERE [c].[CustomerID] LIKE N'A%'
11781176
ORDER BY CASE
1179-
WHEN [c].[CustomerID] = @list3 THEN CAST(1 AS bit)
1177+
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
11801178
ELSE CAST(0 AS bit)
11811179
END, [c].[CustomerID]
11821180
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,6 @@ OFFSET @p ROWS
22022202
//
22032203
"""
22042204
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
2205-
@list3='ALFKI' (Size = 5) (DbType = StringFixedLength)
22062205
@p='1'
22072206
22082207
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID]
@@ -2214,7 +2213,7 @@ END AS [c]
22142213
FROM [Customers] AS [c]
22152214
WHERE [c].[CustomerID] LIKE N'A%'
22162215
ORDER BY CASE
2217-
WHEN [c].[CustomerID] = @list3 THEN CAST(1 AS bit)
2216+
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
22182217
ELSE CAST(0 AS bit)
22192218
END, [c].[CustomerID]
22202219
OFFSET @p ROWS
@@ -2245,7 +2244,6 @@ OFFSET @p ROWS
22452244
//
22462245
"""
22472246
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
2248-
@list3='ALFKI' (Size = 5) (DbType = StringFixedLength)
22492247
@p='1'
22502248
22512249
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID]
@@ -2257,7 +2255,7 @@ END AS [c]
22572255
FROM [Customers] AS [c]
22582256
WHERE [c].[CustomerID] LIKE N'A%'
22592257
ORDER BY CASE
2260-
WHEN [c].[CustomerID] <> @list3 THEN CAST(1 AS bit)
2258+
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
22612259
ELSE CAST(0 AS bit)
22622260
END, [c].[CustomerID]
22632261
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ public override async Task Include_collection_OrderBy_list_does_not_contains(boo
631631
AssertSql(
632632
"""
633633
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
634-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
635634
@p='1'
636635
637636
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -643,7 +642,7 @@ END AS [c]
643642
FROM [Customers] AS [c]
644643
WHERE [c].[CustomerID] LIKE N'A%'
645644
ORDER BY CASE
646-
WHEN [c].[CustomerID] <> @list2 THEN CAST(1 AS bit)
645+
WHEN [c].[CustomerID] <> @list1 THEN CAST(1 AS bit)
647646
ELSE CAST(0 AS bit)
648647
END
649648
OFFSET @p ROWS
@@ -1357,7 +1356,6 @@ public override async Task Include_collection_OrderBy_list_contains(bool async)
13571356
AssertSql(
13581357
"""
13591358
@list1='ALFKI' (Size = 5) (DbType = StringFixedLength)
1360-
@list2='ALFKI' (Size = 5) (DbType = StringFixedLength)
13611359
@p='1'
13621360
13631361
SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate]
@@ -1369,7 +1367,7 @@ END AS [c]
13691367
FROM [Customers] AS [c]
13701368
WHERE [c].[CustomerID] LIKE N'A%'
13711369
ORDER BY CASE
1372-
WHEN [c].[CustomerID] = @list2 THEN CAST(1 AS bit)
1370+
WHEN [c].[CustomerID] = @list1 THEN CAST(1 AS bit)
13731371
ELSE CAST(0 AS bit)
13741372
END
13751373
OFFSET @p ROWS

test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsQuerySqlServerTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,8 +2305,6 @@ public override async Task Collection_projection_over_GroupBy_over_parameter(boo
23052305
"""
23062306
@validIds1='L1 01' (Size = 4000)
23072307
@validIds2='L1 02' (Size = 4000)
2308-
@validIds3='L1 01' (Size = 4000)
2309-
@validIds4='L1 02' (Size = 4000)
23102308
23112309
SELECT [l1].[Date], [l2].[Id]
23122310
FROM (
@@ -2318,7 +2316,7 @@ GROUP BY [l].[Date]
23182316
LEFT JOIN (
23192317
SELECT [l0].[Id], [l0].[Date]
23202318
FROM [LevelOne] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l0]
2321-
WHERE [l0].[Name] IN (@validIds3, @validIds4)
2319+
WHERE [l0].[Name] IN (@validIds1, @validIds2)
23222320
) AS [l2] ON [l1].[Date] = [l2].[Date]
23232321
ORDER BY [l1].[Date]
23242322
""");

test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,8 +3032,6 @@ public override async Task Collection_projection_over_GroupBy_over_parameter(boo
30323032
"""
30333033
@validIds1='L1 01' (Size = 4000)
30343034
@validIds2='L1 02' (Size = 4000)
3035-
@validIds3='L1 01' (Size = 4000)
3036-
@validIds4='L1 02' (Size = 4000)
30373035
30383036
SELECT [l1].[Date], [l2].[Id]
30393037
FROM (
@@ -3045,7 +3043,7 @@ GROUP BY [l].[Date]
30453043
LEFT JOIN (
30463044
SELECT [l0].[Id], [l0].[Date]
30473045
FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l0]
3048-
WHERE [l0].[Name] IN (@validIds3, @validIds4)
3046+
WHERE [l0].[Name] IN (@validIds1, @validIds2)
30493047
) AS [l2] ON [l1].[Date] = [l2].[Date]
30503048
ORDER BY [l1].[Date]
30513049
""");

0 commit comments

Comments
 (0)