westonpace commented on a change in pull request #10008:
URL: https://github.com/apache/arrow/pull/10008#discussion_r616012277



##########
File path: cpp/src/arrow/util/iterator_test.cc
##########
@@ -145,6 +145,23 @@ void AssertIteratorNext(T expected, Iterator<T>& it) {
   ASSERT_EQ(expected, actual);
 }
 
+template <typename T>
+Iterator<T> FailsAt(Iterator<T> source, int failure_index, Status failure) {
+  struct Iter {
+    Result<T> Next() {
+      if (index++ == failure_index) {
+        return failure;
+      }
+      return source.Next();
+    }
+    Iterator<T> source;
+    int failure_index;
+    Status failure;
+    int index;
+  };
+  return Iterator<T>(Iter{std::move(source), failure_index, 
std::move(failure), 0});
+}
+

Review comment:
       Correct.  I've removed them.




-- 
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:
us...@infra.apache.org


Reply via email to