Fix tests.

This commit is contained in:
Nikolai Kochetov 2020-09-16 17:41:01 +03:00
parent 8be45dd3cc
commit 8de76709fb

View File

@ -121,6 +121,9 @@ void addCreatingSetsStep(
for (auto & [description, set] : subqueries_for_sets)
{
if (!set.source)
continue;
auto plan = std::move(set.source);
std::string type = (set.join != nullptr) ? "JOIN"
: "subquery";
@ -139,6 +142,12 @@ void addCreatingSetsStep(
plans.emplace_back(std::move(plan));
}
if (plans.size() == 1)
{
query_plan = std::move(*plans.front());
return;
}
auto creating_sets = std::make_unique<CreatingSetsStep>(std::move(input_streams));
creating_sets->setStepDescription("Create sets before main query execution");
query_plan.unitePlans(std::move(creating_sets), std::move(plans));