fix sql compatible null handling config work with runtime.properties#8908
Closed
clintropolis wants to merge 3 commits intoapache:masterfrom
Closed
fix sql compatible null handling config work with runtime.properties#8908clintropolis wants to merge 3 commits intoapache:masterfrom
clintropolis wants to merge 3 commits intoapache:masterfrom
Conversation
2 tasks
gianm
reviewed
Nov 19, 2019
| ); | ||
| private static NullValueHandlingConfig INSTANCE; | ||
|
|
||
| private static volatile Boolean isReplaceWithDefault = null; |
Contributor
There was a problem hiding this comment.
I'm not sure having a volatile static is a good idea for something that will be used by multiple threads while processing every row. Your benchmark checked single-threaded performance but this could degrade under multithreading.
Could you please either look into this, or do a hybrid of your last two approaches (require explicit initialization in tests, of a non-volatile static, and if-guard it in methods that use it).
Member
Author
There was a problem hiding this comment.
After discussion, maybe the explicit initialization is better in order to rid magic from our world, closing this PR and re-opening #8876
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.
Description
This PR is an alternate to #8876, which was just awful, but I was afraid of introducing an if statement to
NullHandling. replaceWithDefaultin something that is called often on the query path. However, curiosity got the best of me, so I added a new benchmark schema to help determine how much of a performance hit introducing an if statement. It turns it that it isn't really noticeable, so I'm closing #8876 in favor of this PR instead.before PR:
after PR:
This PR has:
Key changed/added classes in this PR
NullHandling