From d25c0ed86b8d965d6d4b9733d6f2be7db83a0c1d Mon Sep 17 00:00:00 2001 From: evanevanevanevannnn Date: Mon, 4 Aug 2025 11:08:59 +0000 Subject: [PATCH 1/3] working inflight restriction & retry policy tweaks --- .../solomon/actors/dq_solomon_read_actor.cpp | 34 +++++++++++++++---- .../yql/providers/solomon/common/util.cpp | 2 +- .../client/solomon_accessor_client.cpp | 7 ++-- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp b/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp index 7aa8f5aeb260..c6d24fb92b61 100644 --- a/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp +++ b/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp @@ -82,6 +82,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped credentialsProvider @@ -97,6 +98,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped= MaxInflight) { + return false; + } + + RequestData(); + return true; } void RequestData() { @@ -477,6 +487,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrappedGetData(request.Selectors, request.From, request.To); @@ -548,6 +559,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped::TPtr RetryPolicy; bool UseMetricsQueue; @@ -596,6 +609,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped CreateDqSolom truePointsFindRange = FromString(it->second); } + ui64 maxInflight = 40; + if (auto it = settings.find("maxApiInflight"); it != settings.end()) { + maxInflight = FromString(it->second); + } + auto credentialsProviderFactory = CreateCredentialsProviderFactoryForStructuredToken(credentialsFactory, token); auto credentialsProvider = credentialsProviderFactory->CreateProvider(); @@ -663,6 +682,7 @@ std::pair CreateDqSolom computeActorBatchSize, TDuration::Seconds(truePointsFindRange), metricsQueueConsumersCountDelta, + maxInflight, metricsQueueActor, counters, credentialsProvider); diff --git a/ydb/library/yql/providers/solomon/common/util.cpp b/ydb/library/yql/providers/solomon/common/util.cpp index cb9c78265273..e1011022e1d0 100644 --- a/ydb/library/yql/providers/solomon/common/util.cpp +++ b/ydb/library/yql/providers/solomon/common/util.cpp @@ -17,7 +17,7 @@ THolder CompileRE2WithCheck(const std::string& pattern) { } const TString LABEL_NAME_PATTERN = R"( *[a-zA-Z0-9-._/]{1,50} *)"; -const TString LABEL_VALUE_PATTERN = R"( *"[ -!#-&(-)+->@-_a-{}-~]{1,200}" *)"; +const TString LABEL_VALUE_PATTERN = R"( *"[ -!#-&(-)+->@-_a-{}-~*|-]{1,200}" *)"; const TString SENSOR_NAME_PATTERN = "(" + LABEL_VALUE_PATTERN + ")?({.*})"; THolder SENSOR_NAME_RE = CompileRE2WithCheck(SENSOR_NAME_PATTERN); diff --git a/ydb/library/yql/providers/solomon/solomon_accessor/client/solomon_accessor_client.cpp b/ydb/library/yql/providers/solomon/solomon_accessor/client/solomon_accessor_client.cpp index 6967417d9d41..f4695ce5000f 100644 --- a/ydb/library/yql/providers/solomon/solomon_accessor/client/solomon_accessor_client.cpp +++ b/ydb/library/yql/providers/solomon/solomon_accessor/client/solomon_accessor_client.cpp @@ -254,16 +254,14 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable NYql::NSo::NProto::TDqSolomonSource&& settings, std::shared_ptr credentialsProvider) : DefaultReplica(defaultReplica) - , MaxApiInflight(maxApiInflight) , Settings(std::move(settings)) , CredentialsProvider(credentialsProvider) { - HttpConfig.SetMaxInFlightCount(MaxApiInflight); + HttpConfig.SetMaxInFlightCount(maxApiInflight); HttpGateway = IHTTPGateway::Make(&HttpConfig); GrpcConfig.Locator = GetGrpcSolomonEndpoint(); GrpcConfig.EnableSsl = Settings.GetUseSsl(); - GrpcConfig.MaxInFlight = MaxApiInflight; GrpcClient = std::make_shared(); GrpcConnection = GrpcClient->CreateGRpcServiceConnection(GrpcConfig); } @@ -436,7 +434,7 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable }, TDuration::MilliSeconds(25), TDuration::MilliSeconds(200), - TDuration::MilliSeconds(500), + TDuration::MilliSeconds(1000), 10 ); @@ -595,7 +593,6 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable private: const TString DefaultReplica; const ui64 ListSizeLimit = 1ull << 20; - const ui64 MaxApiInflight; const NYql::NSo::NProto::TDqSolomonSource Settings; const std::shared_ptr CredentialsProvider; From cc0815d12d0c2cce67af67371d5c26bd39b4c5a7 Mon Sep 17 00:00:00 2001 From: evanevanevanevannnn Date: Mon, 4 Aug 2025 14:30:51 +0000 Subject: [PATCH 2/3] label name aliases --- .../solomon/actors/dq_solomon_read_actor.cpp | 13 ++- .../yql/providers/solomon/common/util.cpp | 23 +++++ .../yql/providers/solomon/common/util.h | 2 + .../yql/providers/solomon/common/util_ut.cpp | 94 +++++++++++++++++++ .../expr_nodes/yql_solomon_expr_nodes.json | 12 ++- .../solomon/proto/dq_solomon_shard.proto | 1 + .../yql_solomon_datasource_type_ann.cpp | 14 ++- .../provider/yql_solomon_dq_integration.cpp | 8 +- .../provider/yql_solomon_io_discovery.cpp | 44 +++++++-- 9 files changed, 190 insertions(+), 21 deletions(-) diff --git a/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp b/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp index c6d24fb92b61..80c3d4c669ba 100644 --- a/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp +++ b/ydb/library/yql/providers/solomon/actors/dq_solomon_read_actor.cpp @@ -130,8 +130,14 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped names(ReadParams.Source.GetSystemColumns().begin(), ReadParams.Source.GetSystemColumns().end()); - names.insert(names.end(), ReadParams.Source.GetLabelNames().begin(), ReadParams.Source.GetLabelNames().end()); + names.insert(names.end(), ReadParams.Source.GetLabelNameAliases().begin(), ReadParams.Source.GetLabelNameAliases().end()); std::sort(names.begin(), names.end()); size_t index = 0; for (auto& n : names) { @@ -370,9 +376,9 @@ class TDqSolomonReadActor : public NActors::TActorBootstrappedsecond] = dictValue; } - for (const auto& c : ReadParams.Source.GetLabelNames()) { + for (const auto& c : ReadParams.Source.GetLabelNameAliases()) { auto& v = items[Index[c]]; - auto it = labels.find(c); + auto it = labels.find(AliasIndex[c]); if (it != labels.end()) { v = NKikimr::NMiniKQL::MakeString(it->second); } else { @@ -618,6 +624,7 @@ class TDqSolomonReadActor : public NActors::TActorBootstrapped SystemColumnPositionIndex; THashMap Index; + THashMap AliasIndex; }; diff --git a/ydb/library/yql/providers/solomon/common/util.cpp b/ydb/library/yql/providers/solomon/common/util.cpp index e1011022e1d0..a70ec0d3203b 100644 --- a/ydb/library/yql/providers/solomon/common/util.cpp +++ b/ydb/library/yql/providers/solomon/common/util.cpp @@ -28,6 +28,9 @@ THolder SELECTOR_RE = CompileRE2WithCheck(SELECTOR_PATTERN); const TString SELECTORS_FULL_PATTERN = "{((" + SELECTOR_PATTERN + ",)*" + SELECTOR_PATTERN + ")?}"; THolder SELECTORS_FULL_RE = CompileRE2WithCheck(SELECTORS_FULL_PATTERN); +const TString USER_LABELS_PATTERN = "(" + LABEL_NAME_PATTERN + ")(?: (?i:as) (" + LABEL_NAME_PATTERN + "))?"; +THolder USER_LABELS_RE = CompileRE2WithCheck(USER_LABELS_PATTERN); + TMaybe InsertOrCheck(std::map& selectors, const TString& name, const TString& value) { auto [it, inserted] = selectors.emplace(name, value); if (!inserted && it->second != value) { @@ -101,6 +104,26 @@ TMaybe BuildSelectorValues(const NSo::NProto::TDqSolomonSource& source, return {}; } +TMaybe ParseLabelNames(const TString& labelNames, TVector& names, TVector& aliases) { + auto labels = StringSplitter(labelNames).Split(',').SkipEmpty().ToList(); + names.reserve(labels.size()); + aliases.reserve(labels.size()); + + for (TString& label : labels) { + TString name; + std::optional alias; + + if (!RE2::FullMatch(label, *USER_LABELS_RE, &name, &alias)) { + return "Label names should be specified in \"label1 [as alias1], label2 [as alias2], ...\" format"; + } + + names.push_back(StripString(name)); + aliases.push_back(StripString(alias ? *alias : name)); + } + + return {}; +} + NSo::NProto::ESolomonClusterType MapClusterType(TSolomonClusterConfig::ESolomonClusterType clusterType) { switch (clusterType) { case TSolomonClusterConfig::SCT_SOLOMON: diff --git a/ydb/library/yql/providers/solomon/common/util.h b/ydb/library/yql/providers/solomon/common/util.h index 84c64d596eaa..acad024df083 100644 --- a/ydb/library/yql/providers/solomon/common/util.h +++ b/ydb/library/yql/providers/solomon/common/util.h @@ -7,6 +7,8 @@ namespace NYql::NSo { TMaybe ParseSelectorValues(const TString& selectors, std::map& result); TMaybe BuildSelectorValues(const NSo::NProto::TDqSolomonSource& source, const TString& selectors, std::map& result); + +TMaybe ParseLabelNames(const TString& labelNames, TVector& names, TVector& aliases); NSo::NProto::ESolomonClusterType MapClusterType(TSolomonClusterConfig::ESolomonClusterType clusterType); diff --git a/ydb/library/yql/providers/solomon/common/util_ut.cpp b/ydb/library/yql/providers/solomon/common/util_ut.cpp index ccd65ede0b7d..5e3320161eb7 100644 --- a/ydb/library/yql/providers/solomon/common/util_ut.cpp +++ b/ydb/library/yql/providers/solomon/common/util_ut.cpp @@ -90,4 +90,98 @@ Y_UNIT_TEST_SUITE(TestSolomonParseSelectors) { } } +Y_UNIT_TEST_SUITE(TestSolomonParseLabelNames) { + Y_UNIT_TEST(Basic) { + TString labelNames = "label1, label2"; + TVector names; + TVector aliases; + + TVector expectedNames = { + "label1", "label2" + }; + TVector expectedAliases = { + "label1", "label2" + }; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), TMaybe{}); + UNIT_ASSERT_EQUAL(names, expectedNames); + UNIT_ASSERT_EQUAL(aliases, expectedAliases); + } + + Y_UNIT_TEST(WithAliases) { + TString labelNames = "label1 as alias1, label2 as alias2"; + TVector names; + TVector aliases; + + TVector expectedNames = { + "label1", "label2" + }; + TVector expectedAliases = { + "alias1", "alias2" + }; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), TMaybe{}); + UNIT_ASSERT_EQUAL(names, expectedNames); + UNIT_ASSERT_EQUAL(aliases, expectedAliases); + } + + Y_UNIT_TEST(OneAlias) { + TString labelNames = "label1, label2 as alias2, label3"; + TVector names; + TVector aliases; + + TVector expectedNames = { + "label1", "label2", "label3" + }; + TVector expectedAliases = { + "label1", "alias2", "label3" + }; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), TMaybe{}); + UNIT_ASSERT_EQUAL(names, expectedNames); + UNIT_ASSERT_EQUAL(aliases, expectedAliases); + } + + Y_UNIT_TEST(CaseSensitivity) { + TString labelNames = "label1, label2 AS alias2, label3"; + TVector names; + TVector aliases; + + TVector expectedNames = { + "label1", "label2", "label3" + }; + TVector expectedAliases = { + "label1", "alias2", "label3" + }; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), TMaybe{}); + UNIT_ASSERT_EQUAL(names, expectedNames); + UNIT_ASSERT_EQUAL(aliases, expectedAliases); + } + + Y_UNIT_TEST(InvalidLabelName) { + TString labelNames = "{}, {}"; + TVector names; + TVector aliases; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), "Label names should be specified in \"label1 [as alias1], label2 [as alias2], ...\" format"); + } + + Y_UNIT_TEST(NoAs) { + TString labelNames = "label1 alias1"; + TVector names; + TVector aliases; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), "Label names should be specified in \"label1 [as alias1], label2 [as alias2], ...\" format"); + } + + Y_UNIT_TEST(EmptyAlias) { + TString labelNames = "label1 as, label2"; + TVector names; + TVector aliases; + + UNIT_ASSERT_EQUAL(ParseLabelNames(labelNames, names, aliases), "Label names should be specified in \"label1 [as alias1], label2 [as alias2], ...\" format"); + } +} + } // namespace NYql::NSo diff --git a/ydb/library/yql/providers/solomon/expr_nodes/yql_solomon_expr_nodes.json b/ydb/library/yql/providers/solomon/expr_nodes/yql_solomon_expr_nodes.json index f19b5c256c29..a23eb6c22289 100644 --- a/ydb/library/yql/providers/solomon/expr_nodes/yql_solomon_expr_nodes.json +++ b/ydb/library/yql/providers/solomon/expr_nodes/yql_solomon_expr_nodes.json @@ -63,7 +63,8 @@ {"Index": 12, "Name": "DownsamplingFill", "Type": "TCoAtom"}, {"Index": 13, "Name": "DownsamplingGridSec", "Type": "TCoUint32"}, {"Index": 14, "Name": "RequiredLabelNames", "Type": "TCoAtomList"}, - {"Index": 15, "Name": "TotalMetricsCount", "Type": "TCoAtom"} + {"Index": 15, "Name": "TotalMetricsCount", "Type": "TCoAtom"}, + {"Index": 16, "Name": "LabelNameAliases", "Type": "TCoAtomList"} ] }, { @@ -85,10 +86,11 @@ {"Index": 2, "Name": "Object", "Type": "TSoObject"}, {"Index": 3, "Name": "SystemColumns", "Type": "TCoAtomList"}, {"Index": 4, "Name": "LabelNames", "Type": "TCoAtomList"}, - {"Index": 5, "Name": "RequiredLabelNames", "Type": "TCoAtomList"}, - {"Index": 6, "Name": "TotalMetricsCount", "Type": "TCoAtom"}, - {"Index": 7, "Name": "RowType", "Type": "TExprBase"}, - {"Index": 8, "Name": "ColumnOrder", "Type": "TExprBase", "Optional": true} + {"Index": 5, "Name": "LabelNameAliases", "Type": "TCoAtomList"}, + {"Index": 6, "Name": "RequiredLabelNames", "Type": "TCoAtomList"}, + {"Index": 7, "Name": "TotalMetricsCount", "Type": "TCoAtom"}, + {"Index": 8, "Name": "RowType", "Type": "TExprBase"}, + {"Index": 9, "Name": "ColumnOrder", "Type": "TExprBase", "Optional": true} ] }, { diff --git a/ydb/library/yql/providers/solomon/proto/dq_solomon_shard.proto b/ydb/library/yql/providers/solomon/proto/dq_solomon_shard.proto index 75a20b293e26..e90555a416d0 100644 --- a/ydb/library/yql/providers/solomon/proto/dq_solomon_shard.proto +++ b/ydb/library/yql/providers/solomon/proto/dq_solomon_shard.proto @@ -69,4 +69,5 @@ message TDqSolomonSource { string GrpcEndpoint = 17; optional string Cluster = 18; optional string Service = 19; + repeated string LabelNameAliases = 20; } diff --git a/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource_type_ann.cpp b/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource_type_ann.cpp index ce99ec7efc98..f7257f940f84 100644 --- a/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource_type_ann.cpp +++ b/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource_type_ann.cpp @@ -38,7 +38,7 @@ class TSolomonDataSourceTypeAnnotationTransformer : public TVisitorTransformerBa } TStatus HandleSoSourceSettings(const TExprNode::TPtr& input, TExprContext& ctx) { - if (!EnsureArgsCount(*input, 16, ctx)) { + if (!EnsureArgsCount(*input, 17, ctx)) { return TStatus::Error; } @@ -71,6 +71,11 @@ class TSolomonDataSourceTypeAnnotationTransformer : public TVisitorTransformerBa return TStatus::Error; } + auto& labelNameAliases = *input->Child(TSoSourceSettings::idx_LabelNameAliases); + if (!EnsureTupleOfAtoms(labelNameAliases, ctx)) { + return TStatus::Error; + } + auto& requiredLabelNames = *input->Child(TSoSourceSettings::idx_RequiredLabelNames); if (!EnsureTupleOfAtoms(requiredLabelNames, ctx)) { return TStatus::Error; @@ -155,7 +160,7 @@ class TSolomonDataSourceTypeAnnotationTransformer : public TVisitorTransformerBa } TStatus HandleRead(const TExprNode::TPtr& input, TExprContext& ctx) { - if (!EnsureMinMaxArgsCount(*input, 8U, 9U, ctx)) { + if (!EnsureMinMaxArgsCount(*input, 9U, 10U, ctx)) { return TStatus::Error; } @@ -177,6 +182,11 @@ class TSolomonDataSourceTypeAnnotationTransformer : public TVisitorTransformerBa return TStatus::Error; } + auto& labelNameAliases = *input->Child(TSoReadObject::idx_LabelNameAliases); + if (!EnsureTupleOfAtoms(labelNameAliases, ctx)) { + return TStatus::Error; + } + auto& requiredLabelNames = *input->Child(TSoReadObject::idx_RequiredLabelNames); if (!EnsureTupleOfAtoms(requiredLabelNames, ctx)) { return TStatus::Error; diff --git a/ydb/library/yql/providers/solomon/provider/yql_solomon_dq_integration.cpp b/ydb/library/yql/providers/solomon/provider/yql_solomon_dq_integration.cpp index 8cd0b80b36c9..9582eca8e9b0 100644 --- a/ydb/library/yql/providers/solomon/provider/yql_solomon_dq_integration.cpp +++ b/ydb/library/yql/providers/solomon/provider/yql_solomon_dq_integration.cpp @@ -260,6 +260,7 @@ class TSolomonDqIntegration: public TDqIntegrationBase { .DownsamplingFill().Build(downsamplingFill ? *downsamplingFill : "") .DownsamplingGridSec().Literal().Build(ToString(downsamplingGridSec ? *downsamplingGridSec : 0)).Build() .TotalMetricsCount(soReadObject.TotalMetricsCount()) + .LabelNameAliases(soReadObject.LabelNameAliases()) .Build() .DataSource(soReadObject.DataSource().Cast()) .RowType(soReadObject.RowType()) @@ -322,11 +323,16 @@ class TSolomonDqIntegration: public TDqIntegrationBase { } for (const auto& c : settings.LabelNames()) { + const auto& columnAsString = c.StringValue(); + source.AddLabelNames(columnAsString); + } + + for (const auto& c : settings.LabelNameAliases()) { const auto& columnAsString = c.StringValue(); if (!uniqueColumns.insert(columnAsString).second) { throw yexception() << "Column " << columnAsString << " already registered"; } - source.AddLabelNames(columnAsString); + source.AddLabelNameAliases(columnAsString); } for (const auto& c : settings.RequiredLabelNames()) { diff --git a/ydb/library/yql/providers/solomon/provider/yql_solomon_io_discovery.cpp b/ydb/library/yql/providers/solomon/provider/yql_solomon_io_discovery.cpp index 198995da7fba..ec694e69ca2b 100644 --- a/ydb/library/yql/providers/solomon/provider/yql_solomon_io_discovery.cpp +++ b/ydb/library/yql/providers/solomon/provider/yql_solomon_io_discovery.cpp @@ -1,6 +1,7 @@ #include "yql_solomon_provider_impl.h" #include +#include #include #include @@ -23,18 +24,30 @@ std::array ExtractSchema(TExprNode::TListType& settings) { return {}; } -TVector ExtractUserLabels(TPositionHandle pos, TExprContext& ctx, TExprNode::TListType& settings) { +TMaybe ExtractUserLabels(TPositionHandle pos, TExprContext& ctx, TExprNode::TListType& settings, TVector& names, TVector& aliases) { + names.clear(); + aliases.clear(); + for (auto it = settings.cbegin(); settings.cend() != it; ++it) { if (const auto item = *it; item->Head().IsAtom("labels")) { - TVector result; - auto labels = StringSplitter(TString(item->Tail().Content())).Split(',').SkipEmpty().ToList(); - result.reserve(labels.size()); - for (TString& label : labels) { - auto v = Build(ctx, pos).Value(StripString(label)).Done(); - result.emplace_back(std::move(v)); + TVector stringNames; + TVector stringAliases; + if (auto error = NSo::ParseLabelNames(TString(item->Tail().Content()), stringNames, stringAliases)) { + return error; } + + names.reserve(stringNames.size()); + aliases.reserve(stringAliases.size()); + for (size_t i = 0; i < stringNames.size(); ++i) { + auto name = Build(ctx, pos).Value(stringNames[i]).Done(); + auto alias = Build(ctx, pos).Value(stringAliases[i]).Done(); + + names.emplace_back(std::move(name)); + aliases.emplace_back(std::move(alias)); + } + settings.erase(it); - return result; + return {}; } } @@ -143,7 +156,12 @@ class TSolomonIODiscoveryTransformer : public TSyncTransformerBase { auto settings = read.Ref().Child(4); auto settingsList = read.Ref().Child(4)->ChildrenList(); auto userSchema = ExtractSchema(settingsList); - TVector userLabels = ExtractUserLabels(settings->Pos(), ctx, settingsList); + TVector userLabels; + TVector userLabelAliases; + if (auto error = ExtractUserLabels(settings->Pos(), ctx, settingsList, userLabels, userLabelAliases)) { + ctx.AddError(TIssue(ctx.GetPosition(settings->Pos()), TStringBuilder() << "Invalid label names: " << *error)); + return {}; + } auto newSettingsBuilder = Build(ctx, settings->Pos()) .Add(settingsList); @@ -163,7 +181,7 @@ class TSolomonIODiscoveryTransformer : public TSyncTransformerBase { .Done(); TVector systemColumns; - auto* scheme = BuildScheme(settings->Pos(), userLabels, ctx, systemColumns); + auto* scheme = BuildScheme(settings->Pos(), userLabelAliases, ctx, systemColumns); if (!scheme) { return {}; } @@ -176,6 +194,10 @@ class TSolomonIODiscoveryTransformer : public TSyncTransformerBase { auto labelNamesNode = Build(ctx, read.Pos()) .Add(userLabels) .Done(); + + auto labelNameAliasesNode = Build(ctx, read.Pos()) + .Add(userLabelAliases) + .Done(); return userSchema.back() ? Build(ctx, read.Pos()) @@ -184,6 +206,7 @@ class TSolomonIODiscoveryTransformer : public TSyncTransformerBase { .Object(soObject) .SystemColumns(systemColumnsNode) .LabelNames(labelNamesNode) + .LabelNameAliases(labelNameAliasesNode) .RequiredLabelNames().Build() .TotalMetricsCount().Build() .RowType(rowTypeNode) @@ -195,6 +218,7 @@ class TSolomonIODiscoveryTransformer : public TSyncTransformerBase { .Object(soObject) .SystemColumns(systemColumnsNode) .LabelNames(labelNamesNode) + .LabelNameAliases(labelNameAliasesNode) .RequiredLabelNames().Build() .TotalMetricsCount().Build() .RowType(rowTypeNode) From eba69b2b42cb60acf2d58d89a2aa8bef94e61203 Mon Sep 17 00:00:00 2001 From: evanevanevanevannnn Date: Tue, 5 Aug 2025 14:30:10 +0000 Subject: [PATCH 3/3] recanonized tests --- .../canondata/test.test_solomon-Basic-default.txt_/opt.yql | 2 +- .../test.test_solomon-BasicExtractMembers-default.txt_/opt.yql | 2 +- .../test.test_solomon-Downsampling-default.txt_/opt.yql | 2 +- .../opt.yql | 2 +- .../test.test_solomon-HistResponse-default.txt_/opt.yql | 2 +- .../test.test_solomon-LabelColumns-default.txt_/opt.yql | 2 +- .../canondata/test.test_solomon-Subquery-default.txt_/opt.yql | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Basic-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Basic-default.txt_/opt.yql index 163fa2f7b86a..cc76908abc90 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Basic-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Basic-default.txt_/opt.yql @@ -4,7 +4,7 @@ (let $3 (DataType 'String)) (let $4 (StructType '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (OptionalType (DataType 'Double))))) (let $5 '('"labels" '"value" '"ts" 'type)) -(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"")) +(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"" '())) (let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0)))) (let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0)))) (let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq")) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-BasicExtractMembers-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-BasicExtractMembers-default.txt_/opt.yql index 2e86037391c0..90bb5bcb4498 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-BasicExtractMembers-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-BasicExtractMembers-default.txt_/opt.yql @@ -2,7 +2,7 @@ (let $1 (Configure! world (DataSource '"config") '"DqEngine" '"force")) (let $2 (DataSink 'result)) (let $3 '('"value")) -(let $4 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") (StructType '('"value" (OptionalType (DataType 'Double)))) $3 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"")) +(let $4 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") (StructType '('"value" (OptionalType (DataType 'Double)))) $3 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"" '())) (let $5 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $4)) (lambda '($9) $9) '('('"_logical_id" '0)))) (let $6 (DqStage '((DqCnUnionAll (TDqOutput $5 '"0"))) (lambda '($10) $10) '('('"_logical_id" '0)))) (let $7 '('('type) '('autoref) '('columns $3))) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Downsampling-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Downsampling-default.txt_/opt.yql index 5c5353388959..b0b6aa347811 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Downsampling-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Downsampling-default.txt_/opt.yql @@ -4,7 +4,7 @@ (let $3 (DataType 'String)) (let $4 (StructType '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (OptionalType (DataType 'Double))))) (let $5 '('"labels" '"value" '"ts" 'type)) -(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"25") '() '"")) +(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"25") '() '"" '())) (let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0)))) (let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0)))) (let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq")) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-DownsamplingValidSettings-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-DownsamplingValidSettings-default.txt_/opt.yql index 8e5ab8dd3779..e2efe8569e7b 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-DownsamplingValidSettings-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-DownsamplingValidSettings-default.txt_/opt.yql @@ -4,7 +4,7 @@ (let $3 (DataType 'String)) (let $4 (StructType '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (OptionalType (DataType 'Double))))) (let $5 '('"labels" '"value" '"ts" 'type)) -(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"15") '() '"")) +(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"15") '() '"" '())) (let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0)))) (let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0)))) (let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq")) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-HistResponse-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-HistResponse-default.txt_/opt.yql index a791d053cc76..edf2c4d43f40 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-HistResponse-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-HistResponse-default.txt_/opt.yql @@ -4,7 +4,7 @@ (let $3 (DataType 'String)) (let $4 (StructType '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (OptionalType (DataType 'Double))))) (let $5 '('"labels" '"value" '"ts" 'type)) -(let $6 (SoSourceSettings world '"hist" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"histogram_percentile(95, {})" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"")) +(let $6 (SoSourceSettings world '"hist" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"histogram_percentile(95, {})" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"" '())) (let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0)))) (let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0)))) (let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq")) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-LabelColumns-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-LabelColumns-default.txt_/opt.yql index aca7216584a2..c59b8926e87b 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-LabelColumns-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-LabelColumns-default.txt_/opt.yql @@ -8,7 +8,7 @@ (let $7 (StructType '($3 $4) '($5 $4) '($6 $4) '('"project" $4) '('"ts" (DataType 'Datetime)) '('type $4) '('"value" (OptionalType (DataType 'Double))))) (let $8 '('"value" '"ts" 'type)) (let $9 '($3 $5 '"project" $6)) -(let $10 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $7 $8 $9 '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"")) +(let $10 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $7 $8 $9 '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15") '() '"" $9)) (let $11 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $10)) (lambda '($14) $14) '('('"_logical_id" '0)))) (let $12 (DqStage '((DqCnUnionAll (TDqOutput $11 '"0"))) (lambda '($15) $15) '('('"_logical_id" '0)))) (let $13 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $12 '"0") '()) '('('type) '('autoref)) '"dq")) diff --git a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Subquery-default.txt_/opt.yql b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Subquery-default.txt_/opt.yql index 1bd756e5779b..d8f4eb762718 100644 --- a/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Subquery-default.txt_/opt.yql +++ b/ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Subquery-default.txt_/opt.yql @@ -4,7 +4,7 @@ (let $3 (DataType 'String)) (let $4 (StructType '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (OptionalType (DataType 'Double))))) (let $5 '('"labels" '"value" '"ts" 'type)) -(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"25") '() '"")) +(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"1970-01-01T00:00:01Z" '"1970-01-02T00:00:01Z" '"" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"25") '() '"" '())) (let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($11) $11) '('('"_logical_id" '0)))) (let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($12) $12) '('('"_logical_id" '0)))) (let $9 '('('type) '('autoref) '('unordered)))