dbms: addition to prev. revision [#METR-15553].

This commit is contained in:
Alexey Milovidov 2015-07-15 05:58:28 +03:00
parent 7726566956
commit 6815bd7c00
3 changed files with 4 additions and 9 deletions

View File

@ -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:
/**

View File

@ -1965,7 +1965,7 @@ void ExpressionAnalyzer::collectJoinedColumns(NameSet & joined_columns, NamesAnd
else if (typeid_cast<const ASTSubquery *>(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<ASTExpressionList &>(*node.using_expr_list);

View File

@ -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();
}