mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
ISSUES-320 fix failed test
This commit is contained in:
parent
054777a5ab
commit
0f415424f8
@ -95,8 +95,8 @@ void InterpreterSelectQuery::init(const BlockInputStreamPtr & input, const Names
|
|||||||
ASTSelectQuery & head_query = static_cast<ASTSelectQuery &>(*head);
|
ASTSelectQuery & head_query = static_cast<ASTSelectQuery &>(*head);
|
||||||
tail = head_query.next_union_all;
|
tail = head_query.next_union_all;
|
||||||
|
|
||||||
interpreter->next_select_in_union_all = std::make_unique<InterpreterSelectQuery>(
|
interpreter->next_select_in_union_all =
|
||||||
head, context, required_column_names, to_stage, subquery_depth);
|
std::make_unique<InterpreterSelectQuery>(head, context, to_stage, subquery_depth);
|
||||||
interpreter = interpreter->next_select_in_union_all.get();
|
interpreter = interpreter->next_select_in_union_all.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -119,10 +119,17 @@ void InterpreterSelectQuery::init(const BlockInputStreamPtr & input, const Names
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!required_column_names.empty())
|
|
||||||
rewriteExpressionList(required_column_names);
|
|
||||||
|
|
||||||
renameColumns();
|
renameColumns();
|
||||||
|
if (!required_column_names.empty()) {
|
||||||
|
rewriteExpressionList(required_column_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_ptr, p->context, p->storage, p->table_column_names, p->subquery_depth, !only_analyze));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
basicInit(input);
|
basicInit(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user