yordan-pavlov commented on a change in pull request #9588:
URL: https://github.com/apache/arrow/pull/9588#discussion_r584291630
##########
File path: rust/arrow/src/array/array_string.rs
##########
@@ -205,28 +205,30 @@ where
let (_, data_len) = iter.size_hint();
let data_len = data_len.expect("Iterator must be sized"); // panic if
no upper bound.
Review comment:
I was thinking that as well, but I think this is still a useful check
because (1) it allows the allocation of a more useful initial capacity - the
lower iterator bound is often 0; and also (2) this check can easily be
satisfied by using `take()`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]