mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Better comments
This commit is contained in:
parent
347d67cbe5
commit
b9e6d1c26b
@ -14,6 +14,8 @@ using TableNamesSet = std::unordered_set<QualifiedTableName>;
|
||||
/// For example, a column default expression can use dictGet() and thus reference a dictionary.
|
||||
/// Does not validate AST, works a best-effort way.
|
||||
TableNamesSet getDependenciesFromCreateQuery(const ContextPtr & global_context, const QualifiedTableName & table_name, const ASTPtr & ast, const String & current_database);
|
||||
|
||||
/// Returns a list of all tables explicitly referenced in the select query specified as a dictionary source.
|
||||
TableNamesSet getDependenciesFromDictionaryNestedSelectQuery(const ContextPtr & global_context, const QualifiedTableName & table_name, const ASTPtr & ast, const String & select_query, const String & current_database);
|
||||
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ void DDLLoadingDependencyVisitor::visit(const ASTFunctionWithKeyValueArguments &
|
||||
else
|
||||
{
|
||||
/// We don't have a table name, we have a select query instead that will be executed during dictionary loading.
|
||||
/// We need to find all tables used in this select query and add them to dependencies.
|
||||
auto select_query_dependencies = getDependenciesFromDictionaryNestedSelectQuery(data.global_context, data.table_name, data.create_query, info->query, data.default_database);
|
||||
data.dependencies.merge(select_query_dependencies);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user