Merge remote-tracking branch 'origin/master' into CLICKHOUSE-2910

This commit is contained in:
Alexey Milovidov 2018-08-15 00:50:00 +03:00
commit dfd9be86d8
3 changed files with 4 additions and 4 deletions

View File

@ -274,7 +274,7 @@ ExpressionAnalyzer::ExpressionAnalyzer(
getArrayJoinedColumns(); getArrayJoinedColumns();
/// Push the predicate expression down to the sub-queries. /// Push the predicate expression down to the sub-queries.
rewrite_sub_queries = PredicateExpressionsOptimizer(select_query, settings, context).optimize(); rewrite_sub_queries = PredicateExpressionsOptimizer(select_query, settings).optimize();
/// Delete the unnecessary from `source_columns` list. Create `unknown_required_source_columns`. Form `columns_added_by_join`. /// Delete the unnecessary from `source_columns` list. Create `unknown_required_source_columns`. Form `columns_added_by_join`.
collectUsedColumns(); collectUsedColumns();

View File

@ -14,8 +14,8 @@ namespace DB
static constexpr auto and_function_name = "and"; static constexpr auto and_function_name = "and";
PredicateExpressionsOptimizer::PredicateExpressionsOptimizer( PredicateExpressionsOptimizer::PredicateExpressionsOptimizer(
ASTSelectQuery * ast_select_, const Settings & settings_, const Context & context_) ASTSelectQuery * ast_select_, const Settings & settings_)
: ast_select(ast_select_), settings(settings_), context(context_) : ast_select(ast_select_), settings(settings_)
{ {
} }

View File

@ -37,7 +37,7 @@ using SubQueriesProjectionColumns = std::map<IAST *, ProjectionsWithAliases>;
class PredicateExpressionsOptimizer class PredicateExpressionsOptimizer
{ {
public: public:
PredicateExpressionsOptimizer(ASTSelectQuery * ast_select_, const Settings & settings_, const Context & context_); PredicateExpressionsOptimizer(ASTSelectQuery * ast_select_, const Settings & settings_);
bool optimize(); bool optimize();