This commit is contained in:
Nikita Mikhaylov 2021-03-25 17:33:11 +03:00
parent e601a432e5
commit 851644d8bf
2 changed files with 4 additions and 3 deletions

View File

@ -1620,7 +1620,8 @@ private:
const auto * insert = parsed_query->as<ASTInsertQuery>();
if (insert && insert->settings_ast)
apply_query_settings(*insert->settings_ast);
const auto * with_output = parsed_query->as<const ASTQueryWithOutput>();
/// FIXME: try to prettify this cast using `as<>()`
const auto * with_output = dynamic_cast<const ASTQueryWithOutput *>(parsed_query.get());
if (with_output && with_output->settings_ast)
apply_query_settings(*with_output->settings_ast);

View File

@ -1102,8 +1102,6 @@ void TCPHandler::receiveQuery()
Settings passed_settings;
passed_settings.read(*in, settings_format);
std::cout << "receive Query" << std::endl;
std::cout << passed_settings.output_format_json_named_tuples_as_objects << std::endl;
/// Interserver secret.
std::string received_hash;
@ -1120,6 +1118,8 @@ void TCPHandler::receiveQuery()
readStringBinary(state.query, *in);
std::cout << state.query << std::endl;
/// It is OK to check only when query != INITIAL_QUERY,
/// since only in that case the actions will be done.
if (!cluster.empty() && client_info.query_kind != ClientInfo::QueryKind::INITIAL_QUERY)