mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
use aliases if exist for original_select_set
This commit is contained in:
parent
ec0ad8804a
commit
95ad1bf6e1
@ -286,8 +286,10 @@ InterpreterSelectQuery::InterpreterSelectQuery(
|
||||
{
|
||||
checkStackSize();
|
||||
|
||||
for (const auto & column : query_ptr->as<ASTSelectQuery &>().select()->children)
|
||||
original_select_set.insert(column->getColumnName());
|
||||
for (const auto & column : query_ptr->as<ASTSelectQuery &>().select()->children) {
|
||||
std::string alias = column->tryGetAlias();
|
||||
original_select_set.insert(alias.empty() ? column->getColumnName() : alias);
|
||||
}
|
||||
|
||||
query_info.ignore_projections = options.ignore_projections;
|
||||
query_info.is_projection_query = options.is_projection_query;
|
||||
|
Loading…
Reference in New Issue
Block a user