File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2424#include < Interpreters/DatabaseCatalog.h>
2525#include < Interpreters/InterpreterCreateQuery.h>
2626#include < Interpreters/InterpreterSetQuery.h>
27+ #include < Interpreters/NormalizeSelectWithUnionQueryVisitor.h>
2728#include < Interpreters/ReplicatedDatabaseQueryStatusSource.h>
2829#include < Interpreters/evaluateConstantExpression.h>
2930#include < Interpreters/executeDDLQueryOnCluster.h>
@@ -66,6 +67,7 @@ namespace Setting
6667 extern const SettingsDistributedDDLOutputMode distributed_ddl_output_mode;
6768 extern const SettingsInt64 distributed_ddl_task_timeout;
6869 extern const SettingsBool throw_on_unsupported_query_inside_transaction;
70+ extern const SettingsSetOperationMode union_default_mode;
6971}
7072
7173namespace ServerSetting
@@ -1463,8 +1465,11 @@ void DatabaseReplicated::recoverLostReplica(const ZooKeeperPtr & current_zookeep
14631465 }
14641466
14651467 auto query_ast = parseQueryFromMetadataInZooKeeper (table_name, create_query_string);
1466-
14671468 auto create_query_context = make_query_context ();
1469+
1470+ NormalizeSelectWithUnionQueryVisitor::Data data{create_query_context->getSettingsRef ()[Setting::union_default_mode]};
1471+ NormalizeSelectWithUnionQueryVisitor{data}.visit (query_ast);
1472+
14681473 // / Check larger comment in DatabaseOnDisk::createTableFromAST
14691474 // / TL;DR applySettingsFromQuery will move the settings from engine to query level
14701475 // / making it possible to overcome a backward incompatible change.
You can’t perform that action at this time.
0 commit comments