-
Notifications
You must be signed in to change notification settings - Fork 1.1k
arrow-row: Add ListView support #9176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
friendlymatthew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, do you mind rebasing? I think CI is failing because this needs to be rebased on the latest master- the base branch is missing the encoded_len fn that was added recently
Otherwise, the implementation makes sense to me
cd2a465 to
29f13ef
Compare
|
Very confused because both this PR and #9175 are based off of latest main, and the tip of the other PR seems to work fine. |
|
Figured it out, I did actually need to change something after the rebase here, also refactored the use in both list-types. |
| list_size += 1; | ||
| } | ||
| } | ||
| O::from_usize(child_count).expect("overflow"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to force a panic?
| .collect(); | ||
|
|
||
| let child = unsafe { converter.convert_raw(&mut child_rows, validate_utf8) }?; | ||
| assert_eq!(child.len(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return an error here since the function returns a result anyway?
|
|
||
| /// Computes the minimum offset and maximum end (offset + size) for a ListView array. | ||
| /// Returns (min_offset, max_end) which can be used to slice the values array. | ||
| fn compute_list_view_bounds<O: OffsetSizeTrait>(array: &GenericListViewArray<O>) -> (usize, usize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function seems oddly placed; should be lower down instead of in the middle of the mod declarations?
Which issue does this PR close?
Closes #9174
What changes are included in this PR?
Implementation and tests. It's mostly copied from
List.Are these changes tested?
Yes, see unit tests.
Are there any user-facing changes?
No, purely additive.
@alamb @Jefffrey