From e82ce52e2f6a458a62fae6171920a57ddbec54a7 Mon Sep 17 00:00:00 2001 From: feng lv Date: Sun, 1 Nov 2020 14:57:41 +0000 Subject: [PATCH] fix --- src/Interpreters/InterpreterSelectQuery.cpp | 1 + .../InterpreterSelectWithUnionQuery.cpp | 14 +++++++------- src/Interpreters/InterpreterSelectWithUnionQuery.h | 1 - src/Parsers/ExpressionListParsers.cpp | 2 -- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 0b86914b1fa..73252894aa5 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -119,6 +119,7 @@ String InterpreterSelectQuery::generateFilterActions( ParserExpression expr_parser; expr_list->children.push_back(parseQuery(expr_parser, column_str, 0, context->getSettingsRef().max_parser_depth)); } + select_ast->setExpression(ASTSelectQuery::Expression::TABLES, std::make_shared()); auto tables = select_ast->tables(); auto tables_elem = std::make_shared(); diff --git a/src/Interpreters/InterpreterSelectWithUnionQuery.cpp b/src/Interpreters/InterpreterSelectWithUnionQuery.cpp index 43ff1c48167..a3798e42f02 100644 --- a/src/Interpreters/InterpreterSelectWithUnionQuery.cpp +++ b/src/Interpreters/InterpreterSelectWithUnionQuery.cpp @@ -1,14 +1,15 @@ -#include -#include -#include -#include #include -#include +#include +#include +#include +#include +#include #include +#include #include #include #include -#include +#include namespace DB { @@ -30,7 +31,6 @@ InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery( if (!num_children) throw Exception("Logical error: no children in ASTSelectWithUnionQuery", ErrorCodes::LOGICAL_ERROR); - /// We first build nested interpreters for each select query, then using this nested interpreters to build Tree Structured nested interpreter. /// Note that we pass 'required_result_column_names' to first SELECT. /// And for the rest, we pass names at the corresponding positions of 'required_result_column_names' in the result of first SELECT, /// because names could be different. diff --git a/src/Interpreters/InterpreterSelectWithUnionQuery.h b/src/Interpreters/InterpreterSelectWithUnionQuery.h index 3976b5f8b82..06d31c92a67 100644 --- a/src/Interpreters/InterpreterSelectWithUnionQuery.h +++ b/src/Interpreters/InterpreterSelectWithUnionQuery.h @@ -2,7 +2,6 @@ #include #include -#include namespace DB { diff --git a/src/Parsers/ExpressionListParsers.cpp b/src/Parsers/ExpressionListParsers.cpp index 220d304751e..1cc72f5fb8b 100644 --- a/src/Parsers/ExpressionListParsers.cpp +++ b/src/Parsers/ExpressionListParsers.cpp @@ -1,5 +1,3 @@ -#include -#include #include #include