ClickHouse/src/Interpreters/RenameColumnVisitor.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
482 B
C++
Raw Normal View History

#include <Interpreters/IdentifierSemantic.h>
#include <Interpreters/RenameColumnVisitor.h>
#include <Parsers/ASTIdentifier.h>
namespace DB
{
2020-04-22 06:01:33 +00:00
void RenameColumnData::visit(ASTIdentifier & identifier, ASTPtr &) const
{
// TODO(ilezhankin): make proper rename
std::optional<String> identifier_column_name = IdentifierSemantic::getColumnName(identifier);
if (identifier_column_name && identifier_column_name == column_name)
identifier.setShortName(rename_to);
}
}