mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
25 lines
702 B
C++
25 lines
702 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST.h>
|
|
#include <Parsers/ASTIdentifier.h>
|
|
#include <Interpreters/InDepthNodeVisitor.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct FindIdentifierBestTableData
|
|
{
|
|
using TypeToVisit = ASTIdentifier;
|
|
const std::vector<DatabaseAndTableWithAlias> & tables;
|
|
std::vector<std::pair<ASTIdentifier *, const DatabaseAndTableWithAlias *>> identifier_table;
|
|
|
|
FindIdentifierBestTableData(const std::vector<DatabaseAndTableWithAlias> & tables_);
|
|
|
|
void visit(ASTIdentifier & identifier, ASTPtr &);
|
|
};
|
|
|
|
using FindIdentifierBestTableMatcher = OneTypeMatcher<FindIdentifierBestTableData>;
|
|
using FindIdentifierBestTableVisitor = InDepthNodeVisitor<FindIdentifierBestTableMatcher, true>;
|
|
|
|
}
|