Skip to content

Commit

Permalink
[YQL-19342][CBO] Use proper error codes (ydb-platform#12159)
Browse files Browse the repository at this point in the history
  • Loading branch information
nepal authored Dec 1, 2024
1 parent b2a5d3a commit 42575b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ydb/library/yql/dq/opt/dq_opt_join_cost_based.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class TOptimizerNativeNew: public IOptimizerNew {
YQL_CLOG(TRACE, CoreDq) << "Maximum DPhyp threshold exceeded";
ExprCtx.AddWarning(
YqlIssue(
{}, TIssuesIds::DQ_OPTIMIZE_ERROR,
{}, TIssuesIds::CBO_ENUM_LIMIT_REACHED,
"Cost Based Optimizer could not be applied to this query: "
"Enumeration is too large, use PRAGMA MaxDPHypDPTableSize='4294967295' to disable the limitation"
)
Expand Down Expand Up @@ -367,7 +367,7 @@ TExprBase DqOptimizeEquiJoinWithCosts(

if (!DqCollectJoinRelationsWithStats(rels, typesCtx, equiJoin, providerCollect)){
ctx.AddWarning(
YqlIssue({}, TIssuesIds::DQ_OPTIMIZE_ERROR,
YqlIssue(ctx.GetPosition(equiJoin.Pos()), TIssuesIds::CBO_MISSING_TABLE_STATS,
"Cost Based Optimizer could not be applied to this query: couldn't load statistics"
)
);
Expand Down

0 comments on commit 42575b9

Please sign in to comment.