mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix
This commit is contained in:
parent
ca1f336c46
commit
ded9007ca0
@ -11,7 +11,6 @@
|
||||
#include <Interpreters/InterpreterSelectQuery.h>
|
||||
#include <Interpreters/IdentifierSemantic.h>
|
||||
#include <Interpreters/getHeaderForProcessingStage.h>
|
||||
#include <Interpreters/TreeRewriter.h>
|
||||
#include <Parsers/ASTSelectQuery.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
#include <Parsers/ASTIdentifier.h>
|
||||
@ -267,6 +266,9 @@ Pipe StorageMerge::read(
|
||||
|
||||
if (const auto * ast_function = typeid_cast<const ASTFunction *>(expr.get()))
|
||||
{
|
||||
if (!ast_function->arguments)
|
||||
return;
|
||||
|
||||
for (const auto & arg : ast_function->arguments->children)
|
||||
extract_columns_from_alias_expression(arg);
|
||||
}
|
||||
|
@ -53,5 +53,5 @@ insert into alias_2 (dt, col, col2, col3) values ('2020-02-01', 1, 2, 3);
|
||||
|
||||
select 'alias2';
|
||||
select colAlias0, colAlias1, colAlias2, colAlias3 from alias_2;
|
||||
select colAlias3, colAlias2, colAlias1, colAlias0 from merge;
|
||||
select * from merge;
|
||||
select colAlias3, colAlias2, colAlias1, colAlias0 from merge order by dt;
|
||||
select * from merge order by dt;
|
||||
|
Loading…
Reference in New Issue
Block a user