diff options
author | pilik <pudge1000-7@ydb.tech> | 2024-09-24 16:36:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 13:36:37 +0000 |
commit | ca658e7ad94e3d3c539d09f8ab0c610ed56ce95d (patch) | |
tree | fffd3a1191f9d9e9fdde838b77d5ddfab3742956 | |
parent | e079e2bf2b71703327df816f50f876f2a8522ee5 (diff) | |
download | ydb-ca658e7ad94e3d3c539d09f8ab0c610ed56ce95d.tar.gz |
[KQP] CBO hints warnings added (#9701)
-rw-r--r-- | ydb/core/kqp/opt/logical/kqp_opt_log.cpp | 6 | ||||
-rw-r--r-- | ydb/library/yql/core/cbo/cbo_optimizer_new.cpp | 2 | ||||
-rw-r--r-- | ydb/library/yql/core/cbo/cbo_optimizer_new.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp index f6471e103f..445cd1252a 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp @@ -91,9 +91,9 @@ public: public: TStatus DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) override { auto status = TOptimizeTransformerBase::DoTransform(input, output, ctx); - - for (const auto& hint: KqpCtx.GetOptimizerHints().GetUnappliedHintStrings()) { - YQL_CLOG(WARN, ProviderYdb) << "Unapplied hint: " + hint; + + for (const auto& hint: KqpCtx.GetOptimizerHints().GetUnappliedString()) { + ctx.AddWarning(YqlIssue({}, TIssuesIds::YQL_UNUSED_HINT, "Unapplied hint: " + hint)); } return status; diff --git a/ydb/library/yql/core/cbo/cbo_optimizer_new.cpp b/ydb/library/yql/core/cbo/cbo_optimizer_new.cpp index 0bfda45956..eb7d07e429 100644 --- a/ydb/library/yql/core/cbo/cbo_optimizer_new.cpp +++ b/ydb/library/yql/core/cbo/cbo_optimizer_new.cpp @@ -303,7 +303,7 @@ const TBaseProviderContext& TBaseProviderContext::Instance() { return staticContext; } -TVector<TString> TOptimizerHints::GetUnappliedHintStrings() { +TVector<TString> TOptimizerHints::GetUnappliedString() { TVector<TString> res; for (const auto& hint: JoinAlgoHints->Hints) { diff --git a/ydb/library/yql/core/cbo/cbo_optimizer_new.h b/ydb/library/yql/core/cbo/cbo_optimizer_new.h index f40a45b55f..9d6950be64 100644 --- a/ydb/library/yql/core/cbo/cbo_optimizer_new.h +++ b/ydb/library/yql/core/cbo/cbo_optimizer_new.h @@ -177,7 +177,7 @@ struct TOptimizerHints { std::shared_ptr<TJoinAlgoHints> JoinAlgoHints = std::make_shared<TJoinAlgoHints>(); std::shared_ptr<TJoinOrderHints> JoinOrderHints = std::make_shared<TJoinOrderHints>(); - TVector<TString> GetUnappliedHintStrings(); + TVector<TString> GetUnappliedString(); /* * The function accepts string with three type of expressions: array of (JoinAlgo | Card | JoinOrder): |