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: Trying to cast null to bool #20498

Closed
smitpatel opened this issue Apr 2, 2020 · 0 comments · Fixed by #20499
Closed

Query: Trying to cast null to bool #20498

smitpatel opened this issue Apr 2, 2020 · 0 comments · Fixed by #20499
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Contributor

smitpatel commented Apr 2, 2020

if (expression is SqlConstantExpression sqlConstant
&& (bool)sqlConstant.Value)

Need null check beforehand.
Also update in Cosmos.

@smitpatel smitpatel self-assigned this Apr 2, 2020
@smitpatel smitpatel added this to the 5.0.0 milestone Apr 2, 2020
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Apr 2, 2020
smitpatel added a commit that referenced this issue Apr 2, 2020
Resolves #20498

Manually tested in debugger. Cannot write a test since LINQ Where requires bool and does not accept bool?
smitpatel added a commit that referenced this issue Apr 2, 2020
Resolves #20498

Manually tested in debugger. Cannot write a test since LINQ Where requires bool and does not accept bool?
smitpatel added a commit that referenced this issue Apr 2, 2020
Resolves #20498

Manually tested in debugger. Cannot write a test since LINQ Where requires bool and does not accept bool?
@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-preview4 Apr 20, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview4, 5.0.0 Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants