Miscellaneous #320 #1763

This commit is contained in:
Alexey Milovidov 2018-02-08 20:17:48 +03:00
parent 75fb48c94c
commit 03adf79fdc

View File

@ -127,9 +127,9 @@ void InterpreterSelectQuery::init(const BlockInputStreamPtr & input, const Names
if (is_first_select_inside_union_all)
{
for (auto p = next_select_in_union_all.get(); p != nullptr; p = p->next_select_in_union_all.get())
p->query_analyzer.reset(new ExpressionAnalyzer(
p->query_analyzer = std::make_unique<ExpressionAnalyzer>(
p->query_ptr, p->context, p->storage, p->table_column_names, p->subquery_depth,
false, p->query_analyzer->getSubqueriesForSets()));
false, p->query_analyzer->getSubqueriesForSets());
}
}
@ -220,12 +220,10 @@ void InterpreterSelectQuery::basicInit(const BlockInputStreamPtr & input)
void InterpreterSelectQuery::initQueryAnalyzer()
{
query_analyzer.reset(
new ExpressionAnalyzer(query_ptr, context, storage, table_column_names, subquery_depth, !only_analyze));
query_analyzer = std::make_unique<ExpressionAnalyzer>(query_ptr, context, storage, table_column_names, subquery_depth, !only_analyze);
for (auto p = next_select_in_union_all.get(); p != nullptr; p = p->next_select_in_union_all.get())
p->query_analyzer.reset(
new ExpressionAnalyzer(p->query_ptr, p->context, p->storage, p->table_column_names, p->subquery_depth, !only_analyze));
p->query_analyzer = std::make_unique<ExpressionAnalyzer>(p->query_ptr, p->context, p->storage, p->table_column_names, p->subquery_depth, !only_analyze);
}
InterpreterSelectQuery::InterpreterSelectQuery(const ASTPtr & query_ptr_, const Context & context_, QueryProcessingStage::Enum to_stage_,