add backwards compatibility mode for multi-value string array null value coercion#12210
Merged
clintropolis merged 1 commit intoapache:masterfrom Feb 1, 2022
Conversation
cryptoe
approved these changes
Jan 29, 2022
Contributor
cryptoe
left a comment
There was a problem hiding this comment.
Failures look unrelated.
LGTM
[ERROR] ITIndexerTest.testGetLockedIntervals:364->AbstractIndexerTest.lambda$unloader$0:71->AbstractIndexerTest.unloadAndKillData:91 » Runtime
| // expression has array output | ||
| && plan.is(ExpressionPlan.Trait.NON_SCALAR_OUTPUT); | ||
|
|
||
| final boolean homogenizeNullMultiValueStringArrays = |
Contributor
There was a problem hiding this comment.
Nit: Maybe move this inside the if statement at 281?
gianm
approved these changes
Feb 1, 2022
This was referenced Feb 8, 2022
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
Follow up to #12078, adds
druid.expressions.homogenizeNullMultiValueStringArrayswith a default value of 'false'. If set to true, it opens an escape hatch to a backwards compatibility mode for the 'buggy' behavior of some multi-value string array functions such asMV_APPENDwhich was fixed in #12078. Prior to that PR, allnull,[], and[null]values were treated as[null], which was only intended for implicitly mapped single value expression across multi-valued string rows, and could produce unintuitive results. This option has been added in case anyone happened to be depending on that behavior, but it produces odd behavior that impacts all array expressions, so it is not recommended to set this flag to true if possible, and instead add a workaround by coercing the values explicitly with additional expressions if needed.This PR has: