add some test fixes

pull/233/head
Christopher Jolly 2 years ago
parent c84a048e23
commit a95891737c

@ -6811,43 +6811,23 @@ WHERE (
public override async Task Parameter_collection_Contains_with_projection_and_ordering(bool async) public override async Task Parameter_collection_Contains_with_projection_and_ordering(bool async)
{ {
#if DEBUG
// GroupBy debug assert. Issue #26104.
Assert.StartsWith(
"Missing alias in the list",
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Parameter_collection_Contains_with_projection_and_ordering(async))).Message);
#else
await base.Parameter_collection_Contains_with_projection_and_ordering(async); await base.Parameter_collection_Contains_with_projection_and_ordering(async);
AssertSql( AssertSql(
""" """
@__ids_0='[10248,10249]' (Size = 4000) SELECT `t`.`Key`, `t`.`MaxTimestamp`
FROM (
SELECT [o].[Quantity] AS [Key], ( SELECT `o`.`Quantity` AS `Key`, (
SELECT MAX([o3].[OrderDate]) SELECT MAX(`o3`.`OrderDate`)
FROM [Order Details] AS [o2] FROM `Order Details` AS `o2`
INNER JOIN [Orders] AS [o3] ON [o2].[OrderID] = [o3].[OrderID] INNER JOIN `Orders` AS `o3` ON `o2`.`OrderID` = `o3`.`OrderID`
WHERE [o2].[OrderID] IN ( WHERE `o2`.`OrderID` IN (10248, 10249) AND `o`.`Quantity` = `o2`.`Quantity`) AS `MaxTimestamp`
SELECT [i1].[value] FROM `Order Details` AS `o`
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i1] WHERE `o`.`OrderID` IN (10248, 10249)
) AND [o].[Quantity] = [o2].[Quantity]) AS [MaxTimestamp] GROUP BY `o`.`Quantity`
FROM [Order Details] AS [o] ) AS `t`
WHERE [o].[OrderID] IN ( ORDER BY `t`.`MaxTimestamp`
SELECT [i].[value] """);
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i]
)
GROUP BY [o].[Quantity]
ORDER BY (
SELECT MAX([o3].[OrderDate])
FROM [Order Details] AS [o2]
INNER JOIN [Orders] AS [o3] ON [o2].[OrderID] = [o3].[OrderID]
WHERE [o2].[OrderID] IN (
SELECT [i0].[value]
FROM OPENJSON(@__ids_0) WITH ([value] int '$') AS [i0]
) AND [o].[Quantity] = [o2].[Quantity])
""");
#endif
} }
private void AssertSql(params string[] expected) private void AssertSql(params string[] expected)

@ -1262,12 +1262,12 @@ CROSS APPLY (
SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity( SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity(
bool isAsync) bool isAsync)
{ {
await base await AssertUnableToTranslateEFProperty(
() => base
.SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity( .SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity(
isAsync); isAsync));
AssertSql( AssertSql();
$@"");
} }
public override async Task Select_with_complex_expression_that_can_be_funcletized(bool isAsync) public override async Task Select_with_complex_expression_that_can_be_funcletized(bool isAsync)

Loading…
Cancel
Save