mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Add a comment
This commit is contained in:
parent
a92ce7f696
commit
26c9bda144
@ -135,6 +135,8 @@ QueryTreeNodePtr buildQueryTreeAndRunPasses(const ASTPtr & query,
|
||||
QueryTreePassManager query_tree_pass_manager(context);
|
||||
addQueryTreePasses(query_tree_pass_manager);
|
||||
|
||||
/// We should not apply any query tree level optimizations on shards
|
||||
/// because it can lead to a changed header.
|
||||
if (select_query_options.ignore_ast_optimizations
|
||||
|| context->getClientInfo().query_kind == ClientInfo::QueryKind::SECONDARY_QUERY)
|
||||
query_tree_pass_manager.run(query_tree, 1 /*up_to_pass_index*/);
|
||||
|
Loading…
Reference in New Issue
Block a user