Fix ASTAsterisk::clone()

This commit is contained in:
Nikolay Degterinsky 2023-02-20 00:26:14 +01:00 committed by GitHub
parent a764628673
commit f9dac6d4cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ namespace DB
ASTPtr ASTAsterisk::clone() const ASTPtr ASTAsterisk::clone() const
{ {
auto clone = std::make_shared<ASTAsterisk>(*this); auto clone = std::make_shared<ASTAsterisk>(*this);
clone->children.clear();
if (expression) { clone->expression = expression->clone(); clone->children.push_back(clone->expression); } if (expression) { clone->expression = expression->clone(); clone->children.push_back(clone->expression); }
if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); }