aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzverevgeny <zverevgeny@ydb.tech>2024-01-24 07:15:42 +0300
committerGitHub <noreply@github.com>2024-01-24 07:15:42 +0300
commitf711ded6252758194b442fd05766bfaf2d7a1562 (patch)
tree98a81aa92891f03a9b0f830dc54878f82d89aeb4
parentf78fb7b75726a25a7fc38b86f599e565e7207963 (diff)
downloadydb-f711ded6252758194b442fd05766bfaf2d7a1562.tar.gz
YQL-17542 remove unused abstraction (#1184)
-rw-r--r--ydb/library/yql/providers/dq/task_runner/tasks_runner_local.cpp37
1 files 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 bb1bb560eb..69395978b4 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 @@ private:
/*______________________________________________________________________________________________*/
-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<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache)
+ std::shared_ptr<NKikimr::NMiniKQL::TComputationPatternLRUCache> patternCache,
+ bool terminateOnError)
: DeterministicMode(!!GetEnv("YQL_DETERMINISTIC_MODE"))
, RandomProvider(
DeterministicMode
@@ -210,6 +211,7 @@ public:
: CreateDefaultTimeProvider())
, FunctionRegistry(functionRegistry)
, TaskTransformFactory(std::move(taskTransformFactory))
+ , TerminateOnError(terminateOnError)
{
ExecutionContext.FuncRegistry = FunctionRegistry;
ExecutionContext.ComputationFactory = compFactory;
@@ -218,29 +220,6 @@ public:
ExecutionContext.PatternCache = patternCache;
}
-protected:
- bool DeterministicMode;
- TIntrusivePtr<IRandomProvider> RandomProvider;
- TIntrusivePtr<ITimeProvider> 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<NKikimr::NMiniKQL::TComputationPatternLRUCache> 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 @@ public:
}
private:
+ bool DeterministicMode;
+ TIntrusivePtr<IRandomProvider> RandomProvider;
+ TIntrusivePtr<ITimeProvider> TimeProvider;
+ const NKikimr::NMiniKQL::IFunctionRegistry* FunctionRegistry;
+ TTaskTransformFactory TaskTransformFactory;
+ NDq::TDqTaskRunnerContext ExecutionContext;
const bool TerminateOnError;
};