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

[5.0.1] Query: Add null check in hash computation in SqlFunctionExpression #23350

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

smitpatel
Copy link
Member

@smitpatel smitpatel commented Nov 16, 2020

Resolves #23336

Description

Hash code computation in SqlFunctionExpression does not check for null for niladic functions (non-parameter functions). Niladic functions are frequent in Spatial types.

Customer Impact

Queries involving collection projection, spatial function and FirstOrDefault will throw null ref.

How found

Customer reported on 5.0.

Test coverage

Test added for affected scenario.

Regression?

Yes, the buggy code existed on 3.1 too but it was not being hit in some query scenario. Other changes in query exposed this bug and made working queries from 3.1 to fail in 5.0

Risk

Low.

roji added a commit that referenced this pull request Nov 17, 2020
@ajcvickers
Copy link
Member

@smitpatel You indicated that this is not a regression, but in the issue the customer says that it is a regression. Why is it appearing as a regression for them?

@smitpatel
Copy link
Member Author

The same null ref was this class was in 3.1 too. I haven't tested customer app. May be that code path was not triggered in 3.1 so could be a regression in that sense.

@smitpatel smitpatel changed the title Query: Add null check in hash computation in SqlFunctionExpression [5.0.1] Query: Add null check in hash computation in SqlFunctionExpression Nov 20, 2020
@smitpatel
Copy link
Member Author

@ajcvickers - Updated.

@ajcvickers
Copy link
Member

Approved by Tactics for 5.0.1.

@smitpatel smitpatel merged commit f54b5b0 into release/5.0 Nov 23, 2020
@smitpatel smitpatel deleted the smit/nullcheck branch November 23, 2020 23:59
@ajcvickers ajcvickers removed this from the 5.0.1 milestone Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants