dbms: fixed error [#METR-11370].

This commit is contained in:
Alexey Milovidov 2014-07-07 02:32:09 +04:00
parent f107415f75
commit 9e1e1f4552

View File

@ -1214,9 +1214,12 @@ bool ExpressionAnalyzer::appendArrayJoin(ExpressionActionsChain & chain, bool on
void ExpressionAnalyzer::addJoinAction(ExpressionActionsPtr & actions, bool only_types)
{
if (only_types)
actions->add(ExpressionAction::ordinaryJoin(nullptr, columns_added_by_join));
else
for (auto & subquery_for_set : subqueries_for_sets)
if (subquery_for_set.second.join)
actions->add(ExpressionAction::ordinaryJoin(only_types ? nullptr : subquery_for_set.second.join, columns_added_by_join));
actions->add(ExpressionAction::ordinaryJoin(subquery_for_set.second.join, columns_added_by_join));
}
bool ExpressionAnalyzer::appendJoin(ExpressionActionsChain & chain, bool only_types)