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

#3836 - Coalescing string concatenation on nullable Expressions #19239

Merged
merged 3 commits into from
Dec 11, 2019

Conversation

svengeance
Copy link
Contributor

@svengeance svengeance commented Dec 8, 2019

Fixes #3836

I was hoping to get a review of the auto-coalescing implementation before I fixed the broken tests (if there's a better way than creating a PR with knowingly broken tests let me know (or if I should have fixed the tests first)). This feature is a slight breaking change if anyone was dependent on return nullability, and it also breaks around 30 or so existing tests due to the difference in output SQL.

Based on comments from @smitpatel on the issue we should be able to handle 3 expressions (column/const/param) in the NullSemanticsVisitor and appropriately coalesce these so we can better emulate expected C# functionality

svengeance and others added 2 commits December 7, 2019 00:13
…nd coalesces all nullable columns/parameters during a string concatenation
@svengeance svengeance changed the title #3836 - Coalescing string concatenation no nullable Expressions #3836 - Coalescing string concatenation on nullable Expressions Dec 9, 2019
@smitpatel
Copy link
Contributor

@svengeance - Changes look correct.

@smitpatel smitpatel requested a review from maumar December 9, 2019 00:16
@svengeance
Copy link
Contributor Author

Good to hear, I'll work on ensuring all broken tests are strictly the result of coalescing during concatenation, fix/commit, and mark the PR as Ready

@svengeance svengeance marked this pull request as ready for review December 9, 2019 05:20
@svengeance
Copy link
Contributor Author

@smitpatel Looks like I got a CI request timeout? How should I go about requesting a rebuild to validate these checks, or is that out of my hands?

@smitpatel
Copy link
Contributor

@svengeance - I kicked off run again.

{
if (leftNullable)
{
newLeft = newLeft is SqlConstantExpression
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maumar - Introduce local function for this.

@maumar maumar merged commit 16343f5 into dotnet:master Dec 11, 2019
@maumar
Copy link
Contributor

maumar commented Dec 11, 2019

@svengeance thank you for the contribution!

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.

Query: Concatenating null with not null string resulting in null
3 participants