Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark-Avery committed Jan 30, 2024
1 parent 10f2a02 commit 7cc0377
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ydb/library/yql/dq/opt/dq_opt_join_cost_based.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ std::shared_ptr<TJoinOptimizerNode> OptimizeSubtree(const std::shared_ptr<TJoinO
return PickBestNonReorderabeJoin(joinTree->LeftArg, joinTree->RightArg, joinTree->JoinConditions, joinTree->JoinType, ctx);
}

TGraph<64> joinGraph;
TGraph<128> joinGraph;
TVector<std::shared_ptr<IBaseOptimizerNode>> rels;
std::set<std::pair<TJoinColumn, TJoinColumn>> joinConditions;

Expand All @@ -1024,10 +1024,10 @@ std::shared_ptr<TJoinOptimizerNode> OptimizeSubtree(const std::shared_ptr<TJoinO
joinGraph.AddNode(i, rels[i]->Labels());
}

// Check if we have more rels than DPccp can handle (64)
// Check if we have more rels than DPccp can handle (128)
// If that's the case - don't optimize the plan and just return it with
// computed statistics
if (rels.size() >= 64) {
if (rels.size() >= 128) {
ComputeStatistics(joinTree, ctx);
return joinTree;
}
Expand Down Expand Up @@ -1055,7 +1055,7 @@ std::shared_ptr<TJoinOptimizerNode> OptimizeSubtree(const std::shared_ptr<TJoinO
YQL_CLOG(TRACE, CoreDq) << str.str();
}

TDPccpSolver<64> solver(joinGraph, rels, ctx);
TDPccpSolver<128> solver(joinGraph, rels, ctx);

// Check that the dynamic table of DPccp is not too big
// If it is, just compute the statistics for the join tree and return it
Expand Down Expand Up @@ -1172,7 +1172,7 @@ class TOptimizerNative: public IOptimizer {

TOutput JoinSearch() override {
auto dummyProviderCtx = TDummyProviderContext();
TDPccpSolver<64> solver(JoinGraph, Rels, dummyProviderCtx);
TDPccpSolver<128> solver(JoinGraph, Rels, dummyProviderCtx);
std::shared_ptr<TJoinOptimizerNode> result = solver.Solve();
if (Log) {
std::stringstream str;
Expand Down Expand Up @@ -1282,7 +1282,7 @@ class TOptimizerNative: public IOptimizer {
const std::function<void(const TString&)> Log;

TVector<std::shared_ptr<IBaseOptimizerNode>> Rels;
TGraph<64> JoinGraph;
TGraph<128> JoinGraph;
};

IOptimizer* MakeNativeOptimizer(const IOptimizer::TInput& input, const std::function<void(const TString&)>& log) {
Expand Down

0 comments on commit 7cc0377

Please sign in to comment.