Skip to content

Commit 60008a5

Browse files
committed
fix import to arcadia
1 parent 2470133 commit 60008a5

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

ydb/core/tx/schemeshard/ut_index_build/ya.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PEERDIR(
1414
ydb/core/testlib/default
1515
ydb/core/tx
1616
ydb/core/tx/schemeshard/ut_helpers
17+
ydb/public/sdk/cpp/client/ydb_table
1718
)
1819

1920
YQL_LAST_ABI_VERSION()

ydb/public/sdk/cpp/client/ydb_table/table.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ static void SerializeTo(const TRenameIndex& rename, Ydb::Table::RenameIndexItem&
253253
proto.set_replace_destination(rename.ReplaceDestination_);
254254
}
255255

256-
template <typename TProto>
257-
TExplicitPartitions TExplicitPartitions::FromProto(const TProto& proto) {
256+
TExplicitPartitions TExplicitPartitions::FromProto(const Ydb::Table::ExplicitPartitions& proto) {
258257
TExplicitPartitions out;
259258
for (const auto& splitPoint : proto.split_points()) {
260259
TValue value(TType(splitPoint.type()), splitPoint.value());
@@ -2365,13 +2364,12 @@ ui64 TIndexDescription::GetSizeBytes() const {
23652364
return SizeBytes_;
23662365
}
23672366

2368-
template <typename TProto>
2369-
TGlobalIndexSettings TGlobalIndexSettings::FromProto(const TProto& proto) {
2370-
auto partitionsFromProto = [](const auto& proto) -> TUniformOrExplicitPartitions {
2367+
TGlobalIndexSettings TGlobalIndexSettings::FromProto(const Ydb::Table::GlobalIndexSettings& proto) {
2368+
auto partitionsFromProto = [](const Ydb::Table::GlobalIndexSettings& proto) -> TUniformOrExplicitPartitions {
23712369
switch (proto.partitions_case()) {
2372-
case TProto::kUniformPartitions:
2370+
case Ydb::Table::GlobalIndexSettings::kUniformPartitions:
23732371
return proto.uniform_partitions();
2374-
case TProto::kPartitionAtKeys:
2372+
case Ydb::Table::GlobalIndexSettings::kPartitionAtKeys:
23752373
return TExplicitPartitions::FromProto(proto.partition_at_keys());
23762374
default:
23772375
return {};
@@ -2398,8 +2396,7 @@ void TGlobalIndexSettings::SerializeTo(Ydb::Table::GlobalIndexSettings& settings
23982396
std::visit(std::move(variantVisitor), Partitions);
23992397
}
24002398

2401-
template <typename TProto>
2402-
TVectorIndexSettings TVectorIndexSettings::FromProto(const TProto& proto) {
2399+
TVectorIndexSettings TVectorIndexSettings::FromProto(const Ydb::Table::VectorIndexSettings& proto) {
24032400
auto covertMetric = [&] {
24042401
switch (proto.metric()) {
24052402
case Ydb::Table::VectorIndexSettings::SIMILARITY_INNER_PRODUCT:
@@ -2481,8 +2478,7 @@ void TVectorIndexSettings::Out(IOutputStream& o) const {
24812478
o << *this;
24822479
}
24832480

2484-
template <typename TProto>
2485-
TKMeansTreeSettings TKMeansTreeSettings::FromProto(const TProto& proto) {
2481+
TKMeansTreeSettings TKMeansTreeSettings::FromProto(const Ydb::Table::KMeansTreeSettings& proto) {
24862482
return {
24872483
.Settings = TVectorIndexSettings::FromProto(proto.settings()),
24882484
.Clusters = proto.clusters(),

ydb/public/sdk/cpp/client/ydb_table/table.h

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ struct TExplicitPartitions {
186186

187187
FLUENT_SETTING_VECTOR(TValue, SplitPoints);
188188

189-
template <typename TProto>
190-
static TExplicitPartitions FromProto(const TProto& proto);
191-
189+
static TExplicitPartitions FromProto(const Ydb::Table::ExplicitPartitions& proto);
192190
void SerializeTo(Ydb::Table::ExplicitPartitions& proto) const;
193191
};
194192

@@ -198,9 +196,7 @@ struct TGlobalIndexSettings {
198196
TPartitioningSettings PartitioningSettings;
199197
TUniformOrExplicitPartitions Partitions;
200198

201-
template <typename TProto>
202-
static TGlobalIndexSettings FromProto(const TProto& proto);
203-
199+
static TGlobalIndexSettings FromProto(const Ydb::Table::GlobalIndexSettings& proto);
204200
void SerializeTo(Ydb::Table::GlobalIndexSettings& proto) const;
205201
};
206202

@@ -227,9 +223,7 @@ struct TVectorIndexSettings {
227223
EVectorType VectorType = EVectorType::Unspecified;
228224
ui32 VectorDimension = 0;
229225

230-
template <typename TProto>
231-
static TVectorIndexSettings FromProto(const TProto& proto);
232-
226+
static TVectorIndexSettings FromProto(const Ydb::Table::VectorIndexSettings& proto);
233227
void SerializeTo(Ydb::Table::VectorIndexSettings& settings) const;
234228

235229
void Out(IOutputStream &o) const;
@@ -258,9 +252,7 @@ struct TKMeansTreeSettings {
258252
ui32 Clusters = 0;
259253
ui32 Levels = 0;
260254

261-
template <typename TProto>
262-
static TKMeansTreeSettings FromProto(const TProto& proto);
263-
255+
static TKMeansTreeSettings FromProto(const Ydb::Table::KMeansTreeSettings& proto);
264256
void SerializeTo(Ydb::Table::KMeansTreeSettings& settings) const;
265257

266258
void Out(IOutputStream &o) const;

0 commit comments

Comments
 (0)