wesm commented on code in PR #13364: URL: https://github.com/apache/arrow/pull/13364#discussion_r894919191
########## cpp/src/arrow/compute/exec_internal.h: ########## @@ -62,16 +63,65 @@ class ARROW_EXPORT ExecBatchIterator { int64_t max_chunksize() const { return max_chunksize_; } private: - ExecBatchIterator(std::vector<Datum> args, int64_t length, int64_t max_chunksize); + ExecBatchIterator(const std::vector<Datum>& args, int64_t length, + int64_t max_chunksize); - std::vector<Datum> args_; + const std::vector<Datum>& args_; std::vector<int> chunk_indexes_; std::vector<int64_t> chunk_positions_; int64_t position_; int64_t length_; int64_t max_chunksize_; }; +/// \brief Break std::vector<Datum> into a sequence of non-owning +/// ExecSpan for kernel execution. The lifetime of the Datum vector +/// must be longer than the lifetime of this object +class ARROW_EXPORT ExecSpanIterator { + public: + /// \brief Construct iterator and do basic argument validation + /// + /// \param[in] args the Datum argument, must be all array-like or scalar + /// \param[in] max_chunksize the maximum length of each ExecSpan. Depending + /// on the chunk layout of ChunkedArray. + static Result<std::unique_ptr<ExecSpanIterator>> Make( Review Comment: you're right, it isn't needed. removing -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org