Skip to content
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

Query: Null semantics :: we are overzealous in applying "full" null expansion in some cases #5670

Closed
maumar opened this issue Jun 6, 2016 · 2 comments
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. punted-for-2.0 type-bug

Comments

@maumar
Copy link
Contributor

maumar commented Jun 6, 2016

ctx.Customers.Where(c => c.Name != "Foo" && c.NullableInt == 5);

will get expanded into:

ctx.Customers.Where(c => (c.Name != "Foo" || c.Name == null) && (c.NullableInt == 5 && c.NullableInt != null);

while first part, i.e. (c.Name != "Foo" || c.Name == null) is necessary, the second expansion is redundant in this case.

In some cases it is beneficial to expand all "leaf" nodes using full expansion, e.g.

ctx.Customers.Where(c => (c.Name != "Foo") ==  (c.NullableInt == 5));

but if the top level operand is different than == and !=, it is not needed and we should only apply simplified null expansion for the second term, which in this case is leave it as is

@divega divega added this to the 1.0.1 milestone Jun 7, 2016
@divega divega added the type-bug label Jun 7, 2016
@divega divega added the pri0 label Jun 7, 2016
@rowanmiller rowanmiller removed the pri0 label Jul 6, 2016
@maumar maumar modified the milestones: 1.2.0, 1.1.0-preview1 Oct 5, 2016
@maumar maumar modified the milestone: 2.0.0 Apr 13, 2017
@ajcvickers ajcvickers added this to the Backlog milestone Apr 17, 2017
@ajcvickers ajcvickers changed the title Null semantics :: we are overzealous in applying "full" null expansion in some cases Query: Null semantics :: we are overzealous in applying "full" null expansion in some cases May 16, 2018
@smitpatel smitpatel removed this from the Backlog milestone Sep 3, 2019
@smitpatel smitpatel added this to the Backlog milestone Sep 3, 2019
@smitpatel
Copy link
Member

@maumar - Is this valid for new query pipeline?

@maumar
Copy link
Contributor Author

maumar commented Sep 3, 2019

we don't have the full/simplified null semantics in the new pipeline, so currently this issue is not applicable. However we might re-introduce it given the perf considerations raised in #17543

@smitpatel smitpatel removed this from the Backlog milestone Sep 3, 2019
@ajcvickers ajcvickers added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Mar 10, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. punted-for-2.0 type-bug
Projects
None yet
Development

No branches or pull requests

5 participants