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

Fix to #15778 - Query: null semantics visitor incorrectly classifies subquery returning single scalar value as non-nullable #15791

Merged
merged 1 commit into from
May 24, 2019

Conversation

maumar
Copy link
Contributor

@maumar maumar commented May 24, 2019

Problem was that when we compared scalar subquery to null, we would assume the subquery is never null so we would never return any results. Scalar subqueries can be null when using entities.Where(e => false).Select(e => e.Name).FirstOrDefault() pattern.

Fix is to always assume SubSelectExpression is nullable.

…subquery returning single scalar value as non-nullable

Problem was that when we compared scalar subquery to null, we would assume the subquery is never null so we would never return any results. Scalar subqueries can be null when using entities.Where(e => false).Select(e => e.Name).FirstOrDefault() pattern.

Fix is to always assume SubSelectExpression is nullable.
@maumar maumar merged commit ca37ebe into master May 24, 2019
@ghost ghost deleted the fix15778 branch May 24, 2019 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants