vibhatha commented on code in PR #13700: URL: https://github.com/apache/arrow/pull/13700#discussion_r945924080
########## cpp/src/arrow/compute/exec/options.h: ########## @@ -430,6 +430,33 @@ class ARROW_EXPORT SelectKSinkNodeOptions : public SinkNodeOptions { SelectKOptions select_k_options; }; +/// \brief Make a node which selects a range of rows passed through it +/// +/// All batches pushed to this node will be accumulated, then selected, by the given +/// fields. Then sorted batches will be forwarded to the generator in sorted order and +/// select the rows with an offset and a limit. +class ARROW_EXPORT FetchSinkNodeOptions : public SinkNodeOptions { + public: + explicit FetchSinkNodeOptions( + int64_t offset, int64_t count, + std::function<Future<util::optional<ExecBatch>>()>* generator, + SortOptions sort_options, bool sort_first = false) + : SinkNodeOptions(generator), + offset(offset), + count(count), + sort_options(sort_options), + sort_first(sort_first) {} + + /// The number of rows to skip. + int64_t offset; + /// The number of rows to select. + int64_t count; + /// Sort options + SortOptions sort_options; + /// Determine sort or fetch precedence. + bool sort_first; Review Comment: I see your point. I will update the code. -- 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