You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/11 01:48:07 UTC
[GitHub] [arrow-rs] maxburke commented on a diff in pull request #3054: Add FixedSizeBinaryArray::try_from_sparse_iter_with_size
maxburke commented on code in PR #3054:
URL: https://github.com/apache/arrow-rs/pull/3054#discussion_r1019760424
##########
arrow-array/src/array/fixed_size_binary_array.rs:
##########
@@ -129,17 +129,29 @@ impl FixedSizeBinaryArray {
/// # Errors
///
/// Returns error if argument has length zero, or sizes of nested slices don't match.
- pub fn try_from_sparse_iter<T, U>(mut iter: T) -> Result<Self, ArrowError>
+ pub fn try_from_sparse_iter<T, U>(iter: T) -> Result<Self, ArrowError>
+ where
+ T: Iterator<Item = Option<U>>,
+ U: AsRef<[u8]>,
+ {
+ Self::try_from_sparse_iter_with_size(iter, None)
+ }
+
+ pub fn try_from_sparse_iter_with_size<T, U>(
+ mut iter: T,
+ asserted_size: Option<i32>,
Review Comment:
I think if we were to just have a single size option we would need to have separate implementations of `try_from_sparse_iter` and `try_from_sparse_iter_with_size`.
(IMO, I think the former is problematic and should be deprecated / removed)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org