Skip to content

Commit c24187c

Browse files
committed
fix import to arcadia
1 parent 8ce79cf commit c24187c

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
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: 8 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 convertDistance = [] (auto distance) -> auto {
24042401
switch (distance) {
24052402
case Ydb::Table::VectorIndexSettings::DISTANCE_COSINE:
@@ -2442,9 +2439,9 @@ TVectorIndexSettings TVectorIndexSettings::FromProto(const TProto& proto) {
24422439

24432440
auto metricFromProto = [&](const auto& proto) -> TVectorIndexSettings::TMetric {
24442441
switch (proto.metric_case()) {
2445-
case TProto::kDistance:
2442+
case Ydb::Table::VectorIndexSettings::kDistance:
24462443
return convertDistance(proto.distance());
2447-
case TProto::kSimilarity:
2444+
case Ydb::Table::VectorIndexSettings::kSimilarity:
24482445
return convertSimilarity(proto.similarity());
24492446
default:
24502447
return {};

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ struct TExplicitPartitions {
185185

186186
FLUENT_SETTING_VECTOR(TValue, SplitPoints);
187187

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

@@ -197,9 +195,7 @@ struct TGlobalIndexSettings {
197195
TPartitioningSettings PartitioningSettings;
198196
TUniformOrExplicitPartitions Partitions;
199197

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

@@ -234,9 +230,7 @@ struct TVectorIndexSettings {
234230
EVectorType VectorType;
235231
ui32 VectorDimension;
236232

237-
template <typename TProto>
238-
static TVectorIndexSettings FromProto(const TProto& proto);
239-
233+
static TVectorIndexSettings FromProto(const Ydb::Table::VectorIndexSettings& proto);
240234
void SerializeTo(Ydb::Table::VectorIndexSettings& settings) const;
241235

242236
void Out(IOutputStream &o) const;

0 commit comments

Comments
 (0)