heyrutvik commented on code in PR #2038:
URL: https://github.com/apache/arrow-rs/pull/2038#discussion_r917722402


##########
arrow/src/array/array_boolean.rs:
##########
@@ -222,38 +222,7 @@ impl<'a> BooleanArray {
 
 impl<Ptr: Borrow<Option<bool>>> FromIterator<Ptr> for BooleanArray {
     fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self {
-        let iter = iter.into_iter();
-        let (_, data_len) = iter.size_hint();
-        let data_len = data_len.expect("Iterator must be sized"); // panic if 
no upper bound.

Review Comment:
   @tustvold I noticed some implementations panic if the upper size hint is not 
available and others pick whatever is available. Is this a deliberate decision? 
AFAIK we use size hint for slight optimization and it should not be enforced 
such a way. Thoughts? 



-- 
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-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to