Skip to content

Commit 42575b9

Browse files
authored
[YQL-19342][CBO] Use proper error codes (#12159)
1 parent b2a5d3a commit 42575b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/library/yql/dq/opt/dq_opt_join_cost_based.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class TOptimizerNativeNew: public IOptimizerNew {
277277
YQL_CLOG(TRACE, CoreDq) << "Maximum DPhyp threshold exceeded";
278278
ExprCtx.AddWarning(
279279
YqlIssue(
280-
{}, TIssuesIds::DQ_OPTIMIZE_ERROR,
280+
{}, TIssuesIds::CBO_ENUM_LIMIT_REACHED,
281281
"Cost Based Optimizer could not be applied to this query: "
282282
"Enumeration is too large, use PRAGMA MaxDPHypDPTableSize='4294967295' to disable the limitation"
283283
)
@@ -367,7 +367,7 @@ TExprBase DqOptimizeEquiJoinWithCosts(
367367

368368
if (!DqCollectJoinRelationsWithStats(rels, typesCtx, equiJoin, providerCollect)){
369369
ctx.AddWarning(
370-
YqlIssue({}, TIssuesIds::DQ_OPTIMIZE_ERROR,
370+
YqlIssue(ctx.GetPosition(equiJoin.Pos()), TIssuesIds::CBO_MISSING_TABLE_STATS,
371371
"Cost Based Optimizer could not be applied to this query: couldn't load statistics"
372372
)
373373
);

0 commit comments

Comments
 (0)