Fix if, multiIf's nullable bug.#5238
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom May 12, 2019
Merged
Conversation
Member
|
That's great! |
Member
|
Although it doesn't seem logical for me. |
Contributor
Author
|
Hmm, the data analyst in my company reported this bug to me. I also double checked this logic, and found that MySQL, Postgresql, IBM DB2 all leverage the same logic, so I decide to behave the same way. |
Member
This is the right decision, thank you! |
This was referenced Jul 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
For changelog. Remove if this is non-significant change.
Category (leave one):
Short description (up to few sentences):
The
if,multiIffunctions should not rely on the condition's Nullable, but should only rely on the branches.You may check the MySQL & Postgresql's results here:
http://sqlfiddle.com/#!9/25e4d/4
http://sqlfiddle.com/#!17/486b3/3