From f711ded6252758194b442fd05766bfaf2d7a1562 Mon Sep 17 00:00:00 2001 From: zverevgeny Date: Wed, 24 Jan 2024 07:15:42 +0300 Subject: [PATCH] YQL-17542 remove unused abstraction (#1184) --- .../dq/task_runner/tasks_runner_local.cpp | 37 ++++++------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp index bb1bb560ebd9..69395978b4da 100644 --- a/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp +++ b/ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp @@ -193,12 +193,13 @@ class TLocalTaskRunner: public ITaskRunner { /*______________________________________________________________________________________________*/ -class TAbstractFactory: public IProxyFactory { +class TLocalFactory: public IProxyFactory { public: - TAbstractFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry, + TLocalFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry, NKikimr::NMiniKQL::TComputationNodeFactory compFactory, TTaskTransformFactory taskTransformFactory, - std::shared_ptr patternCache) + std::shared_ptr patternCache, + bool terminateOnError) : DeterministicMode(!!GetEnv("YQL_DETERMINISTIC_MODE")) , RandomProvider( DeterministicMode @@ -210,6 +211,7 @@ class TAbstractFactory: public IProxyFactory { : CreateDefaultTimeProvider()) , FunctionRegistry(functionRegistry) , TaskTransformFactory(std::move(taskTransformFactory)) + , TerminateOnError(terminateOnError) { ExecutionContext.FuncRegistry = FunctionRegistry; ExecutionContext.ComputationFactory = compFactory; @@ -218,29 +220,6 @@ class TAbstractFactory: public IProxyFactory { ExecutionContext.PatternCache = patternCache; } -protected: - bool DeterministicMode; - TIntrusivePtr RandomProvider; - TIntrusivePtr TimeProvider; - const NKikimr::NMiniKQL::IFunctionRegistry* FunctionRegistry; - TTaskTransformFactory TaskTransformFactory; - - NDq::TDqTaskRunnerContext ExecutionContext; -}; - -/*______________________________________________________________________________________________*/ - -class TLocalFactory: public TAbstractFactory { -public: - TLocalFactory(const NKikimr::NMiniKQL::IFunctionRegistry* functionRegistry, - NKikimr::NMiniKQL::TComputationNodeFactory compFactory, - TTaskTransformFactory taskTransformFactory, - std::shared_ptr patternCache, - bool terminateOnError) - : TAbstractFactory(functionRegistry, compFactory, taskTransformFactory, patternCache) - , TerminateOnError(terminateOnError) - { } - ITaskRunner::TPtr GetOld(const TDqTaskSettings& task, const TString& traceId) override { return new TLocalTaskRunner(task, Get(task, NDqProto::DQ_STATS_MODE_BASIC, traceId)); } @@ -287,6 +266,12 @@ class TLocalFactory: public TAbstractFactory { } private: + bool DeterministicMode; + TIntrusivePtr RandomProvider; + TIntrusivePtr TimeProvider; + const NKikimr::NMiniKQL::IFunctionRegistry* FunctionRegistry; + TTaskTransformFactory TaskTransformFactory; + NDq::TDqTaskRunnerContext ExecutionContext; const bool TerminateOnError; };