| 1038 | // in case of early error. |
| 1039 | |
| 1040 | Status Init() override { |
| 1041 | ARROW_ASSIGN_OR_RAISE(auto istream_it, |
| 1042 | io::MakeInputStreamIterator(input_, read_options_.block_size)); |
| 1043 | |
| 1044 | int max_readahead = cpu_executor_->GetCapacity(); |
| 1045 | int readahead_restart = std::max(1, max_readahead / 2); |
| 1046 | |
| 1047 | ARROW_ASSIGN_OR_RAISE( |
| 1048 | auto bg_it, MakeBackgroundGenerator(std::move(istream_it), io_context_.executor(), |
| 1049 | max_readahead, readahead_restart)); |
| 1050 | |
| 1051 | auto transferred_it = MakeTransferredGenerator(bg_it, cpu_executor_); |
| 1052 | buffer_generator_ = CSVBufferIterator::MakeAsync(std::move(transferred_it)); |
| 1053 | return Status::OK(); |
| 1054 | } |
| 1055 | |
| 1056 | Result<std::shared_ptr<Table>> Read() override { return ReadAsync().result(); } |
| 1057 |
nothing calls this directly
no test coverage detected