mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
dbms: addition to prev. revision [#METR-15553].
This commit is contained in:
parent
7726566956
commit
6815bd7c00
@ -77,9 +77,7 @@ public:
|
|||||||
|
|
||||||
static Block getSampleBlock(
|
static Block getSampleBlock(
|
||||||
ASTPtr query_ptr_,
|
ASTPtr query_ptr_,
|
||||||
const Context & context_,
|
const Context & context_);
|
||||||
QueryProcessingStage::Enum to_stage_ = QueryProcessingStage::Complete,
|
|
||||||
size_t subquery_depth_ = 0);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
@ -1965,7 +1965,7 @@ void ExpressionAnalyzer::collectJoinedColumns(NameSet & joined_columns, NamesAnd
|
|||||||
else if (typeid_cast<const ASTSubquery *>(node.table.get()))
|
else if (typeid_cast<const ASTSubquery *>(node.table.get()))
|
||||||
{
|
{
|
||||||
const auto & subquery = node.table->children.at(0);
|
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);
|
auto & keys = typeid_cast<ASTExpressionList &>(*node.using_expr_list);
|
||||||
|
@ -100,7 +100,7 @@ void InterpreterSelectQuery::basicInit(BlockInputStreamPtr input_)
|
|||||||
{
|
{
|
||||||
if (table_column_names.empty())
|
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
|
else
|
||||||
@ -306,10 +306,7 @@ Block InterpreterSelectQuery::getSampleBlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Block InterpreterSelectQuery::getSampleBlock(ASTPtr query_ptr_,
|
Block InterpreterSelectQuery::getSampleBlock(ASTPtr query_ptr_, const Context & context_)
|
||||||
const Context & context_,
|
|
||||||
QueryProcessingStage::Enum to_stage_,
|
|
||||||
size_t subquery_depth_)
|
|
||||||
{
|
{
|
||||||
return InterpreterSelectQuery(OnlyAnalyzeTag(), query_ptr_, context_).getSampleBlock();
|
return InterpreterSelectQuery(OnlyAnalyzeTag(), query_ptr_, context_).getSampleBlock();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user