Skip to content

Commit 718c1ab

Browse files
SadiHassanltrk2
authored andcommitted
addressed review comments
1 parent b6b3437 commit 718c1ab

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

src/Parsers/Kusto/KustoFunctions/KQLStringFunctions.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,7 @@ bool MakeString::convertImpl(String & out, IParser::Pos & pos)
376376

377377
bool NewGuid::convertImpl(String & out, IParser::Pos & pos)
378378
{
379-
const String fn_name = getKQLFunctionName(pos);
380-
if (fn_name.empty())
381-
return false;
382-
++pos;
383-
++pos;
384-
if (!pos->isEnd() && pos->type != TokenType::Semicolon && pos->type != TokenType::PipeMark)
385-
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Function {} expects 0 argument(s)", fn_name);
386-
--pos;
387-
--pos;
388-
--pos;
389-
return directMapping(out, pos, "generateUUIDv4");
379+
return directMapping(out, pos, "generateUUIDv4", {0, 0});
390380
}
391381

392382
bool ParseCSV::convertImpl(String & out, IParser::Pos & pos)

tests/queries/0_stateless/02366_kql_func_string.reference

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,3 +506,4 @@ $-অ-P-WXY
506506
PQRSTUVWXYZ
507507
PQ
508508
{م爱🐂অ
509+
-- new_guid --

tests/queries/0_stateless/02366_kql_func_string.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,5 +490,5 @@ print str = make_string(range(80, 85), 86, 87, range(88, 90));
490490
print str = make_string(dynamic([]), 80, 81);
491491
print str = make_string(123, 1605, 29233 ,128002, 2437);
492492

493-
-- print t = new_guid(1)
494-
-- Code: 36. DB::Exception: Function new_guid expects 0 argument(s). (BAD_ARGUMENTS)
493+
print '-- new_guid --';
494+
print t = new_guid(1) -- { clientError NUMBER_OF_ARGUMENTS_DOESNT_MATCH }

0 commit comments

Comments
 (0)