-
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
[WIP] Concatenating null with not null string resulting in null #16120
[WIP] Concatenating null with not null string resulting in null #16120
Conversation
Why not use |
|
SQL server 2008R2 is going EOL next month. I think it makes sense to offer concat. |
@divega Looking for your input on this. |
Ping @divega |
Here is the requested input:
|
One more detail to take into account:
|
Design notes:
|
(Fixed/simplified my initial write up)
Yes, I think it is reasonable for the same UseRelationalNulls flag to control both null comparisons and this. The name is a good fit, plus both behaviors are a consequence of null meaning |
Added design notes in original issue. Closing PR. |
DO NOT COMMIT THIS - work in progress.
Looking for some feedback on WIP for issue #3836.
My attack plan was to include a Coalesce function call with all string concatenations. This does produce somewhat ugly SQL for a ton of common scenarios. I changed the check to only wrap references to nullable columns in Coalesce but this will miss a ton of different possible outcomes.
Looking for some guidance on what you fancy doing here, uglify everything or only cover some really specific examples?
I've not updated all the unit tests to match this change yet so there are broken tests.