mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
13 lines
394 B
C++
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;
|
|
}
|
|
}
|