Skip to content

Commit

Permalink
[KQP] CBO hints warnings added (#9701)
Browse files Browse the repository at this point in the history
  • Loading branch information
pashandor789 authored Sep 24, 2024
1 parent e079e2b commit ca658e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ydb/core/kqp/opt/logical/kqp_opt_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ class TKqpLogicalOptTransformer : public TOptimizeTransformerBase {
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;
Expand Down
2 changes: 1 addition & 1 deletion ydb/library/yql/core/cbo/cbo_optimizer_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/library/yql/core/cbo/cbo_optimizer_new.h
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ca658e7

Please sign in to comment.