Skip to content

add multi-value string object vector matcher and expression vector object selectors#17162

Merged
clintropolis merged 1 commit intoapache:masterfrom
clintropolis:vectors-and-array-to-mv
Sep 26, 2024
Merged

add multi-value string object vector matcher and expression vector object selectors#17162
clintropolis merged 1 commit intoapache:masterfrom
clintropolis:vectors-and-array-to-mv

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Fixes an issue after #17098 that can occur with array_to_mv function resulting from a couple of things happening. The first problem is that VectorValueMatcherColumnProcessorFactory method makeObjectProcessor had special handling for STRING, but not further specialization for when it was multi-valued. So, this PR adds MultiValueStringObjectVectorValueMatcher to handle cases where an object selector is asked for a multi-value string. Secondly, expression virtual columns were not expecting multi-value string expressions, so ExpressionVectorSelectors has been updated to check for array typed outputs but with a string type hint, and use a newly added ExpressionVectorMultiValueStringObjectSelector which coerces the values multi-value style back into List or String as appropriate.

Added tests also led to another bug being fixed when array_to_mv was used on a null array row.

@clintropolis clintropolis merged commit 1b5b61e into apache:master Sep 26, 2024
@clintropolis clintropolis deleted the vectors-and-array-to-mv branch September 26, 2024 05:57
clintropolis added a commit to clintropolis/druid that referenced this pull request Sep 26, 2024
clintropolis added a commit to clintropolis/druid that referenced this pull request Sep 28, 2024
clintropolis added a commit that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants