dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.73k stars 3.17k forks source link

Query(NullSemantics): provide a way to remember nullability of some(or all) SqlExpression nodes to enable more null semantics optimizations #20965

Open maumar opened 4 years ago

maumar commented 4 years ago

Currently when processing null semantics we only remember nullability of the last node that has been processed. This is fine for most optimizations, however not good for all. Sometimes, when the expression is simplified significantly we would like to know the nullability of the part that is left, but that has been already lost.

We could either put something on SqlExpression or on the visitor itself

dmitry-lipetsk commented 3 years ago

We could either put something on SqlExpression or on the visitor itself

I vote for SqlExpression.IsNullability RO-property.

smitpatel commented 3 years ago

@maumar - Is this issue still relevant after the changes we made to null semantics visitor?