File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ Result<std::shared_ptr<Table>> AsyncScanner::ToTable() {
406406}
407407
408408Result<EnumeratedRecordBatchGenerator> AsyncScanner::ScanBatchesUnorderedAsync () {
409- return ScanBatchesUnorderedAsync (this ->async_cpu_executor (),
409+ return ScanBatchesUnorderedAsync (scan_options_->cpu_executor
410+ ? scan_options_->cpu_executor
411+ : ::arrow::internal::GetCpuThreadPool (),
410412 /* sequence_fragments=*/ false );
411413}
412414
@@ -607,7 +609,9 @@ Result<std::shared_ptr<Table>> AsyncScanner::Head(int64_t num_rows) {
607609}
608610
609611Result<TaggedRecordBatchGenerator> AsyncScanner::ScanBatchesAsync () {
610- return ScanBatchesAsync (this ->async_cpu_executor ());
612+ return ScanBatchesAsync (scan_options_->cpu_executor
613+ ? scan_options_->cpu_executor
614+ : ::arrow::internal::GetCpuThreadPool ());
611615}
612616
613617Result<TaggedRecordBatchGenerator> AsyncScanner::ScanBatchesAsync (
@@ -784,7 +788,9 @@ Future<int64_t> AsyncScanner::CountRowsAsync(Executor* executor) {
784788}
785789
786790Future<int64_t > AsyncScanner::CountRowsAsync () {
787- return CountRowsAsync (this ->async_cpu_executor ());
791+ return CountRowsAsync (scan_options_->cpu_executor
792+ ? scan_options_->cpu_executor
793+ : ::arrow::internal::GetCpuThreadPool ());
788794}
789795
790796Result<int64_t > AsyncScanner::CountRows () {
Original file line number Diff line number Diff line change @@ -465,11 +465,6 @@ class ARROW_DS_EXPORT Scanner {
465465 TaggedRecordBatchIterator scan);
466466
467467 const std::shared_ptr<ScanOptions> scan_options_;
468-
469- ::arrow::internal::Executor* async_cpu_executor () const {
470- return scan_options_->cpu_executor ? scan_options_->cpu_executor
471- : ::arrow::internal::GetCpuThreadPool ();
472- }
473468};
474469
475470// / \brief ScannerBuilder is a factory class to construct a Scanner. It is used
You can’t perform that action at this time.
0 commit comments