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

Method StartProducing

cpp/src/arrow/acero/tpch_node.cc:2446–2459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2444 }
2445
2446 Status StartProducing(size_t num_threads, OutputBatchCallback output_callback,
2447 FinishedCallback finished_callback,
2448 ScheduleCallback schedule_callback) override {
2449 thread_local_data_.resize(num_threads);
2450 for (ThreadLocalData& tld : thread_local_data_) tld.rng.seed(GetRandomSeed());
2451
2452 output_callback_ = std::move(output_callback);
2453 finished_callback_ = std::move(finished_callback);
2454 schedule_callback_ = std::move(schedule_callback);
2455 for (size_t i = 0; i < num_threads; i++)
2456 RETURN_NOT_OK(schedule_callback_(
2457 [this](size_t thread_index) { return this->ProduceCallback(thread_index); }));
2458 return Status::OK();
2459 }
2460
2461 std::shared_ptr<Schema> schema() const override { return schema_; }
2462

Callers

nothing calls this directly

Calls 4

ProduceCallbackMethod · 0.95
GetRandomSeedFunction · 0.85
resizeMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected