westonpace commented on a change in pull request #9095: URL: https://github.com/apache/arrow/pull/9095#discussion_r565979874
########## File path: cpp/src/arrow/util/iterator_test.cc ########## @@ -214,6 +255,270 @@ TEST(TestVectorIterator, RangeForLoop) { ASSERT_EQ(ints_it, ints.end()); } +template <typename T> +Transformer<T, T> MakeFirstN(int n) { + int remaining = n; + return [remaining](T next) mutable -> Result<TransformFlow<T>> { + if (remaining > 0) { + remaining--; + return TransformYield(next); + } + return TransformFinish(); + }; +} + +TEST(TestIteratorTransform, Truncating) { Review comment: I changed the tests to transform from `TestInt` to a newly created `TestStr` ---------------------------------------------------------------- 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