Fix missing clone in replace column transformer

This commit is contained in:
Amos Bird 2020-09-11 15:46:14 +08:00
parent 87b3984d17
commit da2bb4e0d3
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -110,7 +110,7 @@ void ASTColumnsReplaceTransformer::replaceChildren(ASTPtr & node, const ASTPtr &
if (const auto * id = child->as<ASTIdentifier>()) if (const auto * id = child->as<ASTIdentifier>())
{ {
if (id->shortName() == name) if (id->shortName() == name)
child = replacement; child = replacement->clone();
} }
else else
replaceChildren(child, replacement, name); replaceChildren(child, replacement, name);