MCPcopy Create free account
hub / github.com/apache/arrow / Init

Method Init

cpp/src/arrow/csv/reader.cc:1040–1054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

MakeTransferredGeneratorFunction · 0.85
OKFunction · 0.50
GetCapacityMethod · 0.45

Tested by

no test coverage detected