Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected override Expression VisitChildren(ExpressionVisitor visitor)
/// <param name="arguments">The <see cref="Arguments" /> property of the result.</param>
/// <returns>This expression if no children changed, or an expression with the updated children.</returns>
public virtual TableValuedFunctionExpression Update(IReadOnlyList<SqlExpression> arguments)
=> !arguments.SequenceEqual(Arguments)
=> !arguments.SequenceEqual(Arguments, ReferenceEqualityComparer.Instance)
? new TableValuedFunctionExpression(Alias, Name, Schema, IsBuiltIn, arguments, Annotations)
: this;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ public virtual Task Projection_select_correct_table_in_subquery_when_materializa
ss => (from l2 in ss.Set<Level2>()
join l1 in ss.Set<Level1>() on l2.Level1_Required_Id equals l1.Id
join l3 in ss.Set<Level3>() on l1.Id equals l3.Level2_Required_Id
//where l1.Name == "L1 03"
//where l1.Name == "L1 03"
//where l3.Name == "L3 08"
select l1).OrderBy(l1 => l1.Id).Take(3).Select(l1 => l1.Name));

Expand Down Expand Up @@ -4028,7 +4028,7 @@ public virtual Task Correlated_projection_with_first(bool async)
x.Id,
Results = x.OneToMany_Optional1.OrderBy(xx => xx.Id).Any()
? x.OneToMany_Optional1.OrderBy(xx => xx.Id).First().OneToMany_Optional2.Select(xx => xx.OneToOne_Required_FK3.Id)
: new List<int>()
: new List<int>()
}),
elementSorter: e => e.Id,
elementAsserter: (e, a) =>
Expand All @@ -4042,7 +4042,7 @@ public virtual Task Correlated_projection_with_first(bool async)
public virtual Task Max_in_multi_level_nested_subquery(bool async)
=> AssertQuery(
async,
ss => ss.Set<Level1>().Take(2).Select(x => new
ss => ss.Set<Level1>().OrderBy(l1 => l1.Id).Take(2).Select(x => new
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will change SQL as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, will fix.

{
x.Id,
LevelTwos = x.OneToMany_Optional1.AsQueryable().Select(xx => new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4789,6 +4789,7 @@ public override async Task Max_in_multi_level_nested_subquery(bool async)
FROM (
SELECT TOP(@__p_0) [l].[Id]
FROM [LevelOne] AS [l]
ORDER BY [l].[Id]
) AS [l4]
LEFT JOIN (
SELECT [l0].[Id], [l1].[Id] AS [Id0], [l2].[Id] AS [Id1], CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8274,6 +8274,7 @@ public override async Task Max_in_multi_level_nested_subquery(bool async)
FROM (
SELECT TOP(@__p_0) [l].[Id]
FROM [Level1] AS [l]
ORDER BY [l].[Id]
) AS [l6]
LEFT JOIN (
SELECT CASE
Expand Down