mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
process nested subqueries
This commit is contained in:
parent
7aeeaabf3d
commit
df90cb79b8
@ -5615,9 +5615,13 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi
|
||||
/// Replace storage with values storage of insertion block
|
||||
if (StoragePtr storage = scope.context->getViewSource())
|
||||
{
|
||||
if (auto * query_node = in_second_argument->as<QueryNode>())
|
||||
QueryTreeNodePtr table_expression;
|
||||
/// Don't even ask... there's turtles all the way down...
|
||||
for (auto * query_node = in_second_argument->as<QueryNode>(); query_node; query_node = table_expression->as<QueryNode>())
|
||||
table_expression = extractLeftTableExpression(query_node->getJoinTree());
|
||||
|
||||
if (table_expression)
|
||||
{
|
||||
auto table_expression = extractLeftTableExpression(query_node->getJoinTree());
|
||||
if (auto * query_table_node = table_expression->as<TableNode>())
|
||||
{
|
||||
if (query_table_node->getStorageID().getFullNameNotQuoted() == storage->getStorageID().getFullNameNotQuoted())
|
||||
|
Loading…
Reference in New Issue
Block a user