Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion ydb/library/yql/providers/dq/common/yql_dq_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct TDqSettings {
static constexpr ETaskRunnerStats TaskRunnerStats = ETaskRunnerStats::Basic;
static constexpr ESpillingEngine SpillingEngine = ESpillingEngine::Disable;
static constexpr ui32 CostBasedOptimizationLevel = 0;
static constexpr ui32 MaxDPccpDPTableSize = 10000U;
static constexpr ui32 MaxDPccpDPTableSize = 16400U;

};

Expand Down