add backwards compatibility mode for multi-value string array null value coercion #12210
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.homogenizeNullMultiValueStringArrays
with 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_APPEND
which 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: