Skip to content

Commit

Permalink
Enabling tests for #19020 - Parameter based optimization tries to gro…
Browse files Browse the repository at this point in the history
…up by constant

Issue has already been fixed earlier, likely by null semantics improvements.

Resolves #19020
  • Loading branch information
maumar committed Jan 23, 2020
1 parent 09103e0 commit b88d530
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,11 @@ public override Task Select_subquery_projecting_single_constant_inside_anonymous
{
return base.Select_subquery_projecting_single_constant_inside_anonymous(async);
}

[ConditionalTheory(Skip = "issue #19683")]
public override Task Group_by_on_StartsWith_with_null_parameter_as_argument(bool async)
{
return base.Group_by_on_StartsWith_with_null_parameter_as_argument(async);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7105,15 +7105,16 @@ public virtual Task Group_by_with_aggregate_max_on_entity_type(bool async)
.Select(g => new { g.Key, Aggregate = g.Max() })));
}

[ConditionalTheory(Skip = "issue #19020")]
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Group_by_on_StartsWith_with_null_parameter_as_argument(bool async)
{
var prm = (string)null;

return AssertQueryScalar(
async,
ss => ss.Set<Gear>().GroupBy(g => g.FullName.StartsWith(prm)).Select(g => g.Key));
ss => ss.Set<Gear>().GroupBy(g => g.FullName.StartsWith(prm)).Select(g => g.Key),
ss => ss.Set<Gear>().Select(g => false));
}

[ConditionalTheory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7043,7 +7043,9 @@ public override async Task Group_by_on_StartsWith_with_null_parameter_as_argumen
await base.Group_by_on_StartsWith_with_null_parameter_as_argument(async);

AssertSql(
@"");
@"SELECT CAST(0 AS bit)
FROM [Gears] AS [g]
WHERE [g].[Discriminator] IN (N'Gear', N'Officer')");
}

public override async Task Group_by_with_having_StartsWith_with_null_parameter_as_argument(bool async)
Expand Down

0 comments on commit b88d530

Please sign in to comment.