-
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
GroupBy debug assert: Missing alias in the list: p1,p #26104
Comments
@smitpatel Let's try to fix ASAP for 6.0. |
It might not be a regression. The check throwing exception only runs in debug build. If you have generated query from either version, please post. |
@smitpatel All the SQL is in the docs PR which is using RC1: dotnet/EntityFramework.Docs#3436 |
is the core issue. |
…pplied - Add an internal state to remember the mutability which is set to false after ApplyProjection is called. - Add overload of ApplyProjection which ignores shaper to create an immutable select expression to be used as subquery - Add debug check to verify that all SelectExpression are marked as immutable - Clone mapped projection of SqlExpression kind before translating it further to avoid reference sharing with projection which may be applied at later stage Resolves #26532 - all those expressions have debug check in ctor Resolves #26167 - by having more accurate flag for immutability Resolves #26104 - by cloning the projection before translating further. This issue may get resolved in other way after pending selector work if we reuse projections from subquery but regardless the change seems better to avoid reference sharing of SelectExpression objects
…pplied - Add an internal state to remember the mutability which is set to false after ApplyProjection is called. - Add overload of ApplyProjection which ignores shaper to create an immutable select expression to be used as subquery - Add debug check to verify that all SelectExpression are marked as immutable - Clone mapped projection of SqlExpression kind before translating it further to avoid reference sharing with projection which may be applied at later stage Resolves #26532 - all those expressions have debug check in ctor Resolves #26167 - by having more accurate flag for immutability Resolves #26104 - by cloning the projection before translating further. This issue may get resolved in other way after pending selector work if we reuse projections from subquery but regardless the change seems better to avoid reference sharing of SelectExpression objects
Attempted to fix this by cloning SqlExpression when getting it through projection during Sql translation (so that composed fragment differs from projection causing them not to overwrite the aliases), but that cause issues because we need to identify both of them as same when pushing down subquery so that aggregate operation is lifted inside group by rather than as a subquery outside the group by query. Since it makes SQL worse, this approach may not be right choice. Re-visit with pending selector work. |
Investigated this and root-caused it in #32455. |
Closees dotnet#32784 Fixes dotnet#32757 Part of dotnet#32778 Fixes dotnet#26104
Closees dotnet#32784 Fixes dotnet#32757 Part of dotnet#32778 Fixes dotnet#26104
Closees dotnet#32784 Fixes dotnet#32757 Part of dotnet#32778 Fixes dotnet#26104
Closees dotnet#32784 Fixes dotnet#32757 Part of dotnet#32778 Fixes dotnet#26104
Found working on samples for RC1, then running them as tests on main.
The text was updated successfully, but these errors were encountered: