-
Notifications
You must be signed in to change notification settings - Fork 130
Feature: add append_array_as_list methods to the list arrays
#5707
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
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This seems to do exactly what I want, thanks! |
| /// | ||
| /// Note that the list entry will be non-null but the elements themselves are allowed to be null | ||
| /// (only if the elements [`DType`] is nullable, of course). | ||
| pub fn append_array_as_list(&mut self, array: &dyn Array) -> VortexResult<()> { |
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 there a reason this returns a Result? It doesn't look like you ever return an err back
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.
the vortex_ensure returns an error. Maybe that needs to be renamed...
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 is a weird mix of err and panics, i'm wondering if the overflow check should also be an error
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.
Maybe, though I usually associate overflow with panic so I thought it is fine. We would have to change other things in this file as well then
Adds
append_array_as_listmethods to the list arrays.This makes it possible to circumvent having to use
ListScalars to buildListArrays (or any of the other list array kinds).cc @nrc Let me know if this helps your usecase!