Changed-lines coverage: PR changed C/C++ lines covered by tests: 89.53% (342/382) Uncovered changed code (with context): ================================================================================ src/Client/ClientBase.cpp ================================================================================ --- uncovered block 1759-1759 --- 1757 | 1758 | /// Get new query after substitutions. >> 1759 | if (visitor.getNumberOfReplacedParameters()) 1760 | { 1761 | /// An INSERT in a foreign SQL dialect is sent to the server verbatim: its inline data exists --- uncovered block 1766-1776 --- 1764 | /// Fail close instead of sending a payload-less INSERT. An INSERT without inline data 1765 | /// serializes losslessly (its data travels in data packets) and is not affected. >> 1766 | const auto * insert_ast = getInsertAST(parsed_query); >> 1767 | if (current_query_sent_verbatim && insert_ast && !insert_ast->select >> 1768 | && insert_ast->inline_data_owned_by_transpiled_query) >> 1769 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, >> 1770 | "Substituting query parameters on the client (the server is too old to receive them) " >> 1771 | "is not supported for an INSERT query in a foreign SQL dialect: the query is sent to " >> 1772 | "the server verbatim and must carry all its data inline"); >> 1773 | query = parsed_query->formatWithSecretsOneLine(); >> 1774 | outbound_text_is_serialized_ast = true; 1775 | } >> 1776 | chassert(!query.empty()); 1777 | } 1778 | --- uncovered block 2515-2520 --- 2513 | 2514 | /// Get new query after substitutions. >> 2515 | if (visitor.getNumberOfReplacedParameters()) 2516 | { >> 2517 | query = parsed_query->formatWithSecretsOneLine(); >> 2518 | outbound_text_is_serialized_ast = true; 2519 | } >> 2520 | chassert(!query.empty()); 2521 | } 2522 | ================================================================================ src/Client/LocalConnection.cpp ================================================================================ --- uncovered block 440-440 --- 438 | state->logsql_time_column, state->logsql_message_column, 439 | begin, end, state->allow_experimental_logsql_dialect, state->max_parser_depth, >> 440 | state->max_query_size); 441 | else if (dialect == Dialect::trino) 442 | parser = std::make_unique(state->max_query_size, state->max_parser_depth, state->max_parser_backtracks, end, state->enable_trino_dialect, state->allow_settings_after_format_in_insert, state->implicit_select); ================================================================================ src/Interpreters/executeQuery.cpp ================================================================================ --- uncovered block 2356-2360 --- 2354 | check_external_data_after_deferred_continue = false; 2355 | if (!external_data_buffer->eof()) >> 2356 | throw Exception( >> 2357 | ErrorCodes::NOT_IMPLEMENTED, >> 2358 | "Processing an INSERT query in a foreign SQL dialect together with external data " >> 2359 | "(the HTTP request body) is not supported: the query is transpiled as a whole and " >> 2360 | "must carry all its data inline"); 2361 | }; 2362 | --- uncovered block 2441-2450 --- 2439 | { 2440 | if (!settings[Setting::allow_experimental_polyglot_dialect]) >> 2441 | throw Exception( >> 2442 | ErrorCodes::SUPPORT_IS_DISABLED, >> 2443 | "Support for polyglot SQL transpiler is disabled (turn on setting 'allow_experimental_polyglot_dialect')"); 2444 | 2445 | const String source_dialect = settings[Setting::polyglot_dialect]; 2446 | if (source_dialect.empty()) >> 2447 | throw Exception( >> 2448 | ErrorCodes::SYNTAX_ERROR, >> 2449 | "The `polyglot_dialect` setting must not be empty. " >> 2450 | "Please specify the source SQL dialect (e.g. 'sqlite', 'mysql', 'postgresql')."); 2451 | 2452 | /// Keep the transpiled query alive for the whole query lifetime (see Context). ================================================================================ src/Parsers/Polyglot/ParserPolyglotQuery.cpp ================================================================================ --- uncovered block 262-268 --- 260 | /// Note: `tryParseQuery` advances `parse_pos` past the parsed statement. 261 | while (parse_pos < transpiled_end >> 262 | && (*parse_pos == ' ' || *parse_pos == '\t' || *parse_pos == '\r' || *parse_pos == '\n')) >> 263 | ++parse_pos; 264 | if (parse_pos < transpiled_end) >> 265 | throw Exception( >> 266 | ErrorCodes::SYNTAX_ERROR, >> 267 | "Multi-statement queries are not supported in polyglot dialect mode. " >> 268 | "Please submit one statement at a time."); 269 | 270 | return true; ================================================================================ src/Server/HTTPHandler.cpp ================================================================================ --- uncovered block 1417-1423 --- 1415 | token = next_significant_token(); 1416 | if (token.isEnd() || token.isError()) >> 1417 | return false; 1418 | if (parentheses_depth == 0 && is_keyword(token, "AS")) 1419 | break; 1420 | if (token.type == TokenType::OpeningRoundBracket) >> 1421 | ++parentheses_depth; 1422 | else if (token.type == TokenType::ClosingRoundBracket && parentheses_depth) >> 1423 | --parentheses_depth; 1424 | } 1425 | --- uncovered block 1430-1430 --- 1428 | token = next_significant_token(); 1429 | if (token.isEnd() || token.isError()) >> 1430 | return false; 1431 | bool token_is_past_the_body = false; 1432 | if (is_keyword(token, "MATERIALIZED")) --- uncovered block 1448-1450 --- 1446 | token = next_significant_token(); 1447 | if (token.isEnd() || token.isError()) >> 1448 | return false; 1449 | if (token.type == TokenType::OpeningRoundBracket) >> 1450 | ++depth; 1451 | else if (token.type == TokenType::ClosingRoundBracket) 1452 | --depth; WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 1,029,514/1,166,604 -> current 1,029,597/1,166,834 (delta +83 / +230) Functions : baseline 850,467/923,362 -> current 850,636/923,377 (delta +169 / +15) Branches : baseline 340,471/427,324 -> current 340,519/427,468 (delta +48 / +144)