Skip to content

Commit ca658e7

Browse files
authored
[KQP] CBO hints warnings added (#9701)
1 parent e079e2b commit ca658e7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ydb/core/kqp/opt/logical/kqp_opt_log.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class TKqpLogicalOptTransformer : public TOptimizeTransformerBase {
9191
public:
9292
TStatus DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) override {
9393
auto status = TOptimizeTransformerBase::DoTransform(input, output, ctx);
94-
95-
for (const auto& hint: KqpCtx.GetOptimizerHints().GetUnappliedHintStrings()) {
96-
YQL_CLOG(WARN, ProviderYdb) << "Unapplied hint: " + hint;
94+
95+
for (const auto& hint: KqpCtx.GetOptimizerHints().GetUnappliedString()) {
96+
ctx.AddWarning(YqlIssue({}, TIssuesIds::YQL_UNUSED_HINT, "Unapplied hint: " + hint));
9797
}
9898

9999
return status;

ydb/library/yql/core/cbo/cbo_optimizer_new.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ const TBaseProviderContext& TBaseProviderContext::Instance() {
303303
return staticContext;
304304
}
305305

306-
TVector<TString> TOptimizerHints::GetUnappliedHintStrings() {
306+
TVector<TString> TOptimizerHints::GetUnappliedString() {
307307
TVector<TString> res;
308308

309309
for (const auto& hint: JoinAlgoHints->Hints) {

ydb/library/yql/core/cbo/cbo_optimizer_new.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ struct TOptimizerHints {
177177
std::shared_ptr<TJoinAlgoHints> JoinAlgoHints = std::make_shared<TJoinAlgoHints>();
178178
std::shared_ptr<TJoinOrderHints> JoinOrderHints = std::make_shared<TJoinOrderHints>();
179179

180-
TVector<TString> GetUnappliedHintStrings();
180+
TVector<TString> GetUnappliedString();
181181

182182
/*
183183
* The function accepts string with three type of expressions: array of (JoinAlgo | Card | JoinOrder):

0 commit comments

Comments
 (0)