mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Fix crash in IdentifierResolveScope::dump()
This commit is contained in:
parent
046f348fe7
commit
9a5552b5e6
@ -4573,6 +4573,10 @@ void QueryAnalyzer::resolveTableFunction(QueryTreeNodePtr & table_function_node,
|
|||||||
|
|
||||||
if (parametrized_view_storage)
|
if (parametrized_view_storage)
|
||||||
{
|
{
|
||||||
|
/// Remove initial TableFunctionNode from the set. Otherwise it may lead to segfault
|
||||||
|
/// when IdentifierResolveScope::dump() is used.
|
||||||
|
scope.table_expressions_in_resolve_process.erase(table_function_node.get());
|
||||||
|
|
||||||
auto fake_table_node = std::make_shared<TableNode>(parametrized_view_storage, scope_context);
|
auto fake_table_node = std::make_shared<TableNode>(parametrized_view_storage, scope_context);
|
||||||
fake_table_node->setAlias(table_function_node->getAlias());
|
fake_table_node->setAlias(table_function_node->getAlias());
|
||||||
table_function_node = fake_table_node;
|
table_function_node = fake_table_node;
|
||||||
|
Loading…
Reference in New Issue
Block a user