-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Conversation
Merge from Base Repo
…nd coalesces all nullable columns/parameters during a string concatenation
@svengeance - Changes look correct. |
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 |
…oncat expressions
@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? |
@svengeance - I kicked off run again. |
{ | ||
if (leftNullable) | ||
{ | ||
newLeft = newLeft is SqlConstantExpression |
There was a problem hiding this comment.
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.
@svengeance thank you for the contribution! |
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