-
Notifications
You must be signed in to change notification settings - Fork 784
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
Simplify ListArray::from_iter_primitive #2886
Simplify ListArray::from_iter_primitive #2886
Conversation
@@ -157,47 +157,26 @@ impl<OffsetSize: OffsetSizeTrait> GenericListArray<OffsetSize> { | |||
pub fn from_iter_primitive<T, P, I>(iter: I) -> Self | |||
where | |||
T: ArrowPrimitiveType, | |||
P: AsRef<[Option<<T as ArrowPrimitiveType>::Native>]> |
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 AsRef constraint is rather constraining, it is good to see it gone
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 any benchmark that should be run?
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 also an API change as well, is it not? Due to the different type bounds
Self::from(array_data) | ||
builder.append(true); | ||
} | ||
None => builder.append(false), |
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.
No, that was only needed because nulls in a fixed size list take up the same amount of space as non-null values
Not sure, as it is only removing a trait bound not adding a new one. So it should be backwards compatible
Not that I could find, I'm not sure that this method is used anywhere outside of tests |
Which issue does this PR close?
Closes #.
Rationale for this change
Drive by cleanup
What changes are included in this PR?
Are there any user-facing changes?