Merge pull request #60534 from kashwy/Fix_max_query_size_for_kql_compound_operator

Fix_max_query_size_for_kql_compound_operator:
This commit is contained in:
János Benjamin Antal 2024-03-07 10:32:19 +01:00 committed by GitHub
commit 6e58161fe6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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;