-
Notifications
You must be signed in to change notification settings - Fork 17
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
Introduce IterRef
trait for deserialization
#73
Introduce IterRef
trait for deserialization
#73
Conversation
Wonder if we can get rid of |
@aldanor Thanks for adding the changelog and the changes. I think we may be able to remove the |
@@ -71,11 +88,11 @@ macro_rules! impl_arrow_array { | |||
impl ArrowArray for $array { | |||
type BaseArrayType = Self; | |||
|
|||
fn iter_from_array_ref(b: &dyn Array) -> <&Self as IntoIterator>::IntoIter { | |||
fn iter_from_array_ref(b: &dyn Array) -> <Self as IterRef>::Iter<'_> { | |||
b.as_any() | |||
.downcast_ref::<Self::BaseArrayType>() | |||
.unwrap() |
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.
@ncpenke I was wondering about this unwrap - can it panic?... This doesn't look too nice
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.
@aldanor In theory it can, though we do a top-level schema check. But if the underlying arrow structure is different than the schema it advertises, then we can panic. I'll fix it in my upcoming change. I'll add you as a reviewer so that you can include any other feedback.
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.
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.
Yea, I can take on that (the error type).
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.
Thanks! I'm almost done with my changes. I just changed the unwrap to an Option, and will leave the error type change to you.
No description provided.