westonpace commented on a change in pull request #9945: URL: https://github.com/apache/arrow/pull/9945#discussion_r609965523
########## File path: cpp/src/arrow/util/async_generator.h ########## @@ -1063,6 +1063,86 @@ AsyncGenerator<T> MakeConcatenatedGenerator(AsyncGenerator<AsyncGenerator<T>> so return MergedGenerator<T>(std::move(source), 1); } +template <typename T> +struct Enumerated { + util::optional<T> value; + int index; + bool last; Review comment: Yes, it has to return one end token. If I return the end token for each child stream I'll end up with 3. In other words, I want... ``` A1 B1 A2 (last-in-stream) C1 C2 (last-in-stream) B2 (last-in-stream) END ``` ...and not... ``` A1 B1 A2 END C1 C2 END B2 END ``` -- 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