diff --git a/dbms/include/DB/Interpreters/InterpreterSelectQuery.h b/dbms/include/DB/Interpreters/InterpreterSelectQuery.h index 1275b655491..2b33370905b 100644 --- a/dbms/include/DB/Interpreters/InterpreterSelectQuery.h +++ b/dbms/include/DB/Interpreters/InterpreterSelectQuery.h @@ -77,9 +77,7 @@ public: static Block getSampleBlock( ASTPtr query_ptr_, - const Context & context_, - QueryProcessingStage::Enum to_stage_ = QueryProcessingStage::Complete, - size_t subquery_depth_ = 0); + const Context & context_); private: /** diff --git a/dbms/src/Interpreters/ExpressionAnalyzer.cpp b/dbms/src/Interpreters/ExpressionAnalyzer.cpp index f1a606b539c..1f5cd00a5ad 100644 --- a/dbms/src/Interpreters/ExpressionAnalyzer.cpp +++ b/dbms/src/Interpreters/ExpressionAnalyzer.cpp @@ -1965,7 +1965,7 @@ void ExpressionAnalyzer::collectJoinedColumns(NameSet & joined_columns, NamesAnd else if (typeid_cast(node.table.get())) { const auto & subquery = node.table->children.at(0); - nested_result_sample = InterpreterSelectQuery::getSampleBlock(subquery, context, QueryProcessingStage::Complete, subquery_depth + 1); + nested_result_sample = InterpreterSelectQuery::getSampleBlock(subquery, context); } auto & keys = typeid_cast(*node.using_expr_list); diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index a96020ea445..c71a9653046 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -100,7 +100,7 @@ void InterpreterSelectQuery::basicInit(BlockInputStreamPtr input_) { if (table_column_names.empty()) { - table_column_names = InterpreterSelectQuery::getSampleBlock(query.table, context, to_stage, subquery_depth).getColumnsList(); + table_column_names = InterpreterSelectQuery::getSampleBlock(query.table, context).getColumnsList(); } } else @@ -306,10 +306,7 @@ Block InterpreterSelectQuery::getSampleBlock() } -Block InterpreterSelectQuery::getSampleBlock(ASTPtr query_ptr_, - const Context & context_, - QueryProcessingStage::Enum to_stage_, - size_t subquery_depth_) +Block InterpreterSelectQuery::getSampleBlock(ASTPtr query_ptr_, const Context & context_) { return InterpreterSelectQuery(OnlyAnalyzeTag(), query_ptr_, context_).getSampleBlock(); }