alamb opened a new issue #197: URL: https://github.com/apache/arrow-rs/issues/197
*Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-11862 As [~jorgecarleitao] says on https://github.com/apache/arrow/pull/9588#discussion_r584290701 The (Rust) Iterator spec recommends, but does not require, that the iterator reports a correct length. Consumer that lead to undefined behavior from an incorrect size_hint are the causers of said undefined behavior. The only case where consumers can trust the iterators' length is when the interator implement unsafe trait TrustedLen. Unfortunately, TrustedLen is still in unstable. For that reason, we have been exposing unsafe Buffer::from_trusted_len_iter and the like for those cases. So the code should be updated to handle the case where the reported `size_hint` turns out to be incorrect -- 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]
