Uh oh!
There was an error while loading. Please reload this page.
Create ArrayScalarBuilder for creating single element List arrays - #13623
Merged
Conversation
alamb
marked this pull request as draft
December 2, 2024 19:50
alambforce-pushed
the
alamb/single_row_array
branch
from
December 2, 2024 20:13
be70e93 to
26f2492Comparealamb
commented
Dec 2, 2024
| count | ||
| } | ||
| /// Creates single element [`ListArray`], [`LargeListArray`] and |
ContributorAuthor
There was a problem hiding this comment.
The idea is to pull the wrapping code into this structure so it remains consistent across list types
alamb
marked this pull request as ready for review
December 2, 2024 20:31
| /// assert_eq!(list_arr.len(), 1); | ||
| /// ``` | ||
| #[derive(Debug, Clone)] | ||
| pub struct SingleRowArrayBuilder { |
Contributor
There was a problem hiding this comment.
It seems this builder is for List, maybe name with SingleRowListArrayBuilder is more concise?
jayzhan211
approved these changes
Dec 3, 2024
jayzhan211
commented
Dec 4, 2024
Contributor
Thanks @alamb |
alamb
commented
Dec 4, 2024
ContributorAuthor
Thank you @jayzhan211 |
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 freeto 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?
Rationale for this change
There are a bewildering number of small free functions for performing the same basic thing: converting an array into a single row list array / scalar
This has also lead to subtle bugs such as #13481
Let's encapsulate that operation into a well documented structure
What changes are included in this PR?
ArrayScalarBuilderAre these changes tested?
Are there any user-facing changes?