aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordtorilov <dtorilov@yandex-team.com>2024-12-04 14:15:40 +0300
committerdtorilov <dtorilov@yandex-team.com>2024-12-04 14:42:41 +0300
commitad4afa932ee3a5156686d185b58b685cdf4888ad (patch)
tree49329ef78d9d3d4381e3bf276b590307e572cec3
parentdd4950b261106312653a90df9501dc021e2ba6f9 (diff)
downloadydb-ad4afa932ee3a5156686d185b58b685cdf4888ad.tar.gz
YT-23673: Remove duplicate EExecutionBackend
commit_hash:40a3c250498f3360e1564b0678c0e7d5543e9954
-rw-r--r--yt/yt/client/api/client_common.h9
-rw-r--r--yt/yt/client/driver/table_commands.cpp3
-rw-r--r--yt/yt/library/codegen_api/execution_backend.h16
3 files changed, 21 insertions, 7 deletions
diff --git a/yt/yt/client/api/client_common.h b/yt/yt/client/api/client_common.h
index f5ece90e358..d2b07ace80f 100644
--- a/yt/yt/client/api/client_common.h
+++ b/yt/yt/client/api/client_common.h
@@ -2,6 +2,8 @@
#include "public.h"
+#include <yt/yt/library/codegen_api/execution_backend.h>
+
#include <yt/yt/client/hydra/public.h>
#include <yt/yt/client/misc/workload.h>
@@ -162,11 +164,6 @@ struct TSelectRowsOptionsBase
bool NewRangeInference = true;
};
-DEFINE_ENUM(EExecutionBackend,
- (Native)
- (WebAssembly)
-);
-
struct TSelectRowsOptions
: public TSelectRowsOptionsBase
{
@@ -185,7 +182,7 @@ struct TSelectRowsOptions
//! YSON map with placeholder values for parameterized queries.
NYson::TYsonString PlaceholderValues;
//! Native or WebAssembly execution backend.
- std::optional<EExecutionBackend> ExecutionBackend;
+ std::optional<NCodegen::EExecutionBackend> ExecutionBackend;
//! Explicitly allow or forbid the usage of row cache.
std::optional<bool> UseLookupCache;
//! Allow queries without any condition on key columns.
diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp
index be98527d0d4..3ae3e78a234 100644
--- a/yt/yt/client/driver/table_commands.cpp
+++ b/yt/yt/client/driver/table_commands.cpp
@@ -34,6 +34,7 @@ namespace NYT::NDriver {
using namespace NApi;
using namespace NChaosClient;
using namespace NChunkClient;
+using namespace NCodegen;
using namespace NConcurrency;
using namespace NFormats;
using namespace NHiveClient;
@@ -824,7 +825,7 @@ void TSelectRowsCommand::Register(TRegistrar registrar)
})
.Optional(/*init*/ false);
- registrar.ParameterWithUniversalAccessor<std::optional<NApi::EExecutionBackend>>(
+ registrar.ParameterWithUniversalAccessor<std::optional<EExecutionBackend>>(
"execution_backend",
[] (TThis* command) -> auto& {
return command->Options.ExecutionBackend;
diff --git a/yt/yt/library/codegen_api/execution_backend.h b/yt/yt/library/codegen_api/execution_backend.h
new file mode 100644
index 00000000000..ed4413eeb52
--- /dev/null
+++ b/yt/yt/library/codegen_api/execution_backend.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <library/cpp/yt/misc/enum.h>
+
+namespace NYT::NCodegen {
+
+////////////////////////////////////////////////////////////////////////////////
+
+DEFINE_ENUM(EExecutionBackend,
+ (Native)
+ (WebAssembly)
+);
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NCodegen