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

Method MakeAsyncIterator

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

Source from the content-addressed store, hash-verified

207 }
208
209 static AsyncGenerator<CSVBlock> MakeAsyncIterator(
210 AsyncGenerator<std::shared_ptr<Buffer>> buffer_generator,
211 std::unique_ptr<Chunker> chunker, std::shared_ptr<Buffer> first_buffer,
212 int64_t skip_rows) {
213 auto block_reader =
214 std::make_shared<SerialBlockReader>(std::move(chunker), first_buffer, skip_rows);
215 // Wrap shared pointer in callable
216 Transformer<std::shared_ptr<Buffer>, CSVBlock> block_reader_fn =
217 [block_reader](std::shared_ptr<Buffer> next) {
218 return (*block_reader)(std::move(next));
219 };
220 return MakeTransformedGenerator(std::move(buffer_generator), block_reader_fn);
221 }
222
223 Result<TransformFlow<CSVBlock>> operator()(std::shared_ptr<Buffer> next_buffer) {
224 if (buffer_ == nullptr) {

Callers

nothing calls this directly

Calls 1

MakeTransformedGeneratorFunction · 0.85

Tested by

no test coverage detected