Skip to content

#3836 - Coalescing string concatenation on nullable Expressions - #19239

Merged
maumar merged 3 commits into
dotnet:masterfrom
svengeance:fix_3836_wip
Dec 11, 2019
Merged

maumar merged 3 commits into
dotnet:masterfrom
svengeance:fix_3836_wip

Conversation

@svengeance

@svengeance svengeance commented Dec 8, 2019 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@svengeance - Changes look correct.

@smitpatel
smitpatel requested a review from maumar December 9, 2019 00:16
@svengeance

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

@svengeance - I kicked off run again.

{
if (leftNullable)
{
newLeft = newLeft is SqlConstantExpression

Copy link
Copy Markdown
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

maumar commented Dec 11, 2019

Copy link
Copy Markdown
Contributor

@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