Skip to content

Commit d420fa7

Browse files
committed
Remove owned_thread_pool_
1 parent bd75e74 commit d420fa7

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

cpp/src/arrow/acero/exec_plan.cc

+1-27
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ struct ExecPlanImpl : public ExecPlan {
6060
std::shared_ptr<const KeyValueMetadata> metadata = nullptr,
6161
std::shared_ptr<ThreadPool> owned_thread_pool = nullptr)
6262
: metadata_(std::move(metadata)),
63-
query_context_(options, exec_context),
64-
owned_thread_pool_(std::move(owned_thread_pool)) {}
63+
query_context_(options, exec_context) {}
6564

6665
~ExecPlanImpl() override {
6766
if (started_ && !finished_.is_finished()) {
@@ -340,9 +339,6 @@ struct ExecPlanImpl : public ExecPlan {
340339
arrow::util::tracing::Span span_;
341340
std::shared_ptr<const KeyValueMetadata> metadata_;
342341
QueryContext query_context_;
343-
// This field only exists for backwards compatibility. Remove once the deprecated
344-
// ExecPlan::Make overloads have been removed.
345-
std::shared_ptr<ThreadPool> owned_thread_pool_;
346342
};
347343

348344
ExecPlanImpl* ToDerived(ExecPlan* ptr) { return checked_cast<ExecPlanImpl*>(ptr); }
@@ -402,28 +398,6 @@ Result<std::shared_ptr<ExecPlan>> ExecPlan::Make(
402398
return Make(/*opts=*/{}, ctx, std::move(metadata));
403399
}
404400

405-
// Deprecated and left for backwards compatibility. If the user does not supply a CPU
406-
// executor then we will create a 1 thread pool and tie its lifetime to the plan
407-
Result<std::shared_ptr<ExecPlan>> ExecPlan::Make(
408-
QueryOptions opts, ExecContext* ctx,
409-
std::shared_ptr<const KeyValueMetadata> metadata) {
410-
if (ctx->executor() == nullptr) {
411-
ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ThreadPool> tpool, ThreadPool::Make(1));
412-
ExecContext actual_ctx(ctx->memory_pool(), tpool.get(), ctx->func_registry());
413-
return std::shared_ptr<ExecPlan>(
414-
new ExecPlanImpl{opts, actual_ctx, std::move(metadata), std::move(tpool)});
415-
}
416-
return ExecPlan::Make(opts, *ctx, std::move(metadata));
417-
}
418-
419-
// Deprecated
420-
Result<std::shared_ptr<ExecPlan>> ExecPlan::Make(
421-
ExecContext* ctx, std::shared_ptr<const KeyValueMetadata> metadata) {
422-
ARROW_SUPPRESS_DEPRECATION_WARNING
423-
return Make(/*opts=*/{}, ctx, std::move(metadata));
424-
ARROW_UNSUPPRESS_DEPRECATION_WARNING
425-
}
426-
427401
ExecNode* ExecPlan::AddNode(std::unique_ptr<ExecNode> node) {
428402
return ToDerived(this)->AddNode(std::move(node));
429403
}

0 commit comments

Comments
 (0)