Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 0d2e627

Browse files
bagrorgkurapov-peter
authored andcommitted
Move templates extraction out of branch
1 parent 28cbfc9 commit 0d2e627

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

omniscidb/QueryEngine/Execute.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,12 +2125,11 @@ std::unique_ptr<policy::ExecutionPolicy> Executor::getExecutionPolicy(
21252125
devices_dispatch_modes.begin()->first, devices_dispatch_modes);
21262126
} else {
21272127
CHECK(cfg.enable_heterogeneous_execution);
2128-
if (config_->exec.enable_cost_model && ra_exe_unit.cost_model != nullptr &&
2129-
!ra_exe_unit.templs.empty()) {
2130-
AnalyticalTemplatesExtractor extractor;
2131-
std::vector<costmodel::AnalyticalTemplate> templates
2132-
= extractor.extractTemplates(ra_exe_unit);
21332128

2129+
AnalyticalTemplatesExtractor extractor;
2130+
std::vector<costmodel::AnalyticalTemplate> templates = extractor.extractTemplates(ra_exe_unit);
2131+
if (config_->exec.enable_cost_model && ra_exe_unit.cost_model != nullptr &&
2132+
!templates.empty()) {
21342133
size_t bytes = 0;
21352134
// TODO(bagrorg): how can we get bytes estimation more correctly?
21362135
for (const auto& e : table_infos) {

0 commit comments

Comments
 (0)