mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +00:00
051dddd8df
Goes from rebuilding 483 objects to 165 when it's modified
25 lines
533 B
C++
25 lines
533 B
C++
#pragma once
|
|
|
|
#include <Interpreters/InDepthNodeVisitor.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTIdentifier;
|
|
|
|
/// Data for RenameColumnVisitor which traverse tree and rename all columns with
|
|
/// name column_name to rename_to
|
|
struct RenameColumnData
|
|
{
|
|
using TypeToVisit = ASTIdentifier;
|
|
|
|
String column_name;
|
|
String rename_to;
|
|
|
|
void visit(ASTIdentifier & identifier, ASTPtr & ast) const;
|
|
};
|
|
|
|
using RenameColumnMatcher = OneTypeMatcher<RenameColumnData>;
|
|
using RenameColumnVisitor = InDepthNodeVisitor<RenameColumnMatcher, true>;
|
|
}
|