ClickHouse/src/Interpreters/RenameColumnVisitor.cpp
Alexey Milovidov 0a7edce036 Checkpoint
2020-04-22 09:01:33 +03:00

13 lines
394 B
C++

#include <Interpreters/RenameColumnVisitor.h>
#include <Interpreters/IdentifierSemantic.h>
namespace DB
{
void RenameColumnData::visit(ASTIdentifier & identifier, ASTPtr &) const
{
std::optional<String> identifier_column_name = IdentifierSemantic::getColumnName(identifier);
if (identifier_column_name && identifier_column_name == column_name)
identifier.name = rename_to;
}
}