Add map to ScalarValue::try_from as a list#8488
Closed
razeghi71 wants to merge 1 commit intoapache:mainfrom
Closed
Add map to ScalarValue::try_from as a list#8488razeghi71 wants to merge 1 commit intoapache:mainfrom
razeghi71 wants to merge 1 commit intoapache:mainfrom
Conversation
67ea868 to
b7e9431
Compare
Contributor
|
Thanks @razeghi71 -- I will review this shortly |
alamb
reviewed
Dec 12, 2023
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thank you for this PR @razeghi71 -- I think there may be a better way as I explained on some of the comments
| ))), | ||
| 1, | ||
| )), | ||
| DataType::Map(field, _) => ScalarValue::List(new_null_array( |
Contributor
There was a problem hiding this comment.
I think the data type needs to match the ScalarValue enum (e.g. we need to add DataType::Map to make this work properly). I'll keep the discussion going at #8262 (comment)
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
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.
Which issue does this PR close?
Closes #8262
Rationale for this change
To fix the problem mentioned in the issue linked.
What changes are included in this PR?
ScalarValue::try_fromdidn't have an implementation for map. So I added it. As described in the description ofDataType::Map:So I've returned a list of empty list with the same map schema.
Are these changes tested?
I wrote a test for it. But not sure if is enough
Are there any user-facing changes?
No