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/03/29 18:43:38 UTC

[GitHub] [arrow-rs] viirya commented on a change in pull request #1506: Implement `size_hint` and `ExactSizedIterator` for `DecimalArray`

viirya commented on a change in pull request #1506:
URL: https://github.com/apache/arrow-rs/pull/1506#discussion_r837796885



##########
File path: arrow/src/array/array_binary.rs
##########
@@ -1020,8 +1020,17 @@ impl<'a> std::iter::Iterator for DecimalIter<'a> {
             }
         }
     }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        let remain = self.array.len() - self.current;
+        (remain, Some(remain))
+    }
 }
 
+/// iterator has have known size.

Review comment:
       ```suggestion
   /// iterator has known size.
   ```




-- 
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