-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlServer: Generate False predicate when skip/take both are 0 #23192
Conversation
Hello @smitpatel! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
src/EFCore.SqlServer/Query/Internal/SkipTakeCollapsingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
@@ -3152,12 +3154,12 @@ private bool Equals(SelectExpression selectExpression) | |||
/// <returns> This expression if no children changed, or an expression with the updated children. </returns> | |||
// This does not take internal states since when using this method SelectExpression should be finalized | |||
public SelectExpression Update( | |||
[NotNull] List<ProjectionExpression> projections, | |||
[NotNull] List<TableExpressionBase> tables, | |||
[NotNull] IReadOnlyList<ProjectionExpression> projections, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change, including in obsolete method above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not breaking change if you follow the bases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndriySvyryd - Is this breaking change? Not sure how this missed API review.
For the obsolete one, it added additional NotNulls but the overload is already obsolete, not sure what would be the way to unbreak it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type change is indeed only a provider-facing binary breaking change only, which should be fine. But if this method used to work for null parameters and doesn't any more, that is more problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not this method. This method was always marked with NotNull and has Check.NotNull for all the non-nullable arguments.
src/EFCore.SqlServer/Query/Internal/SkipTakeCollapsingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
@@ -2326,6 +2327,35 @@ public virtual Task GroupBy_aggregate_join_another_GroupBy_aggregate(bool async) | |||
elementSorter: o => o.Key); | |||
} | |||
|
|||
[ConditionalTheory] | |||
[MemberData(nameof(IsAsyncData))] | |||
public virtual Task GroupBy_aggregate_after_skip_0_take_0(bool async) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but as this is a SQL Server problem, should these tests live exclusively in the SQL Server test suite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works in other providers then what is the issue verifying that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the fact of adding unnecessary tests to all providers for something that is only a problem for one. I have a lot of PG-only tests which aren't added to the base classes only because EFCore.PG isn't in the EF Core repo, and SQL Server is.
It's also a form of documentation for someone reviewing the tests, to note which provider is actually affected by it etc. Just putting it in the right place.
But no strong feelings here.
83b4a78
to
29b62ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from the nullability change which we should decide on
Oops, forgot to remove auto-merge :/ If needed we can discuss/amend post-merge. |
Resolves #22525