Skip to content

Commit

Permalink
Merge pull request #61010 from ClickHouse/backport/24.2/60534
Browse files Browse the repository at this point in the history
Backport #60534 to 24.2: Fix_max_query_size_for_kql_compound_operator:
  • Loading branch information
robot-ch-test-poll2 committed Mar 7, 2024
2 parents b7f2ade + 8ba9a31 commit 81104cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Parsers/Kusto/ParserKQLQuery.cpp
Expand Up @@ -416,8 +416,9 @@ bool ParserKQLQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
ParserToken s_dash(TokenType::Minus);
if (s_dash.ignore(pos, expected))
{
String tmp_op(op_pos_begin->begin, pos->end);
kql_operator = tmp_op;
if (!isValidKQLPos(pos))
return false;
kql_operator = String(op_pos_begin->begin, pos->end);
}
else
--pos;
Expand Down
4 changes: 4 additions & 0 deletions tests/queries/0_stateless/02366_kql_mvexpand.sql
Expand Up @@ -33,3 +33,7 @@ print '-- mv_expand_test_table | mv-expand with_itemindex=index c,d to typeof(bo
mv_expand_test_table | mv-expand with_itemindex=index c,d to typeof(bool);
print '-- mv_expand_test_table | mv-expand c to typeof(bool) --';
mv_expand_test_table | mv-expand c to typeof(bool);
SET max_query_size = 28;
SET dialect='kusto';
mv_expand_test_table | mv-expand c, d; -- { serverError SYNTAX_ERROR }
SET max_query_size=262144;

0 comments on commit 81104cf

Please sign in to comment.