Query: incorrect results for queries projecting collections with distinct/group by, where we use projection as identifiers and all the columns are nullable #31277
Labels
area-query
breaking-change
punted-for-8.0
Originally planned for the EF Core 8.0 (EF8) release, but moved out due to resource constraints.
type-bug
Milestone
To mitigate the problem with insufficient information in case of Distinct and GroupBy, we use the projection/ group key as identifiers (see #22049). However, this is not correct if all the would-be identifiers are nullable. If that's the case and the values of all those columns would be null, we are not able to distinguish between empty set and set containing null value. (in fact, we would treat every null value as a new empty collection).
We should detect this and throw to prevent data corruption. (This is a breaking change - bad results only happen in case of null values, so if one has nullable columns without null values, everything was working fine, and now it would throw)
The text was updated successfully, but these errors were encountered: