Skip to content

Commit fc581bc

Browse files
authored
Merge pull request #254 from ClibMouse/bug_fix_2425
bug fix 2425
2 parents 262dea9 + 0c86a9e commit fc581bc

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Parsers/Kusto/KustoFunctions/KQLGeneralFunctions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ bool Lookup::convertImpl(String & out, IParser::Pos & pos)
5050
{
5151
arg = getConvertedArgument(fn_name, temp_pos);
5252
++num_of_args;
53+
if (temp_pos->type == TokenType::ClosingRoundBracket)
54+
break;
5355
++temp_pos;
5456
}
5557
if (num_of_args == 3)

tests/queries/0_stateless/02366_kql_func_general.reference

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Angel Stewart Professional Partial College 46 bigger
3434
-- lookup
3535
First
3636
default
37+
10 First 1
38+
11 First 2
39+
12 First 3

tests/queries/0_stateless/02366_kql_func_general.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ Customers | extend t = iif(Age <= 10, "smaller", "bigger");
4646
print '-- lookup';
4747
print lookup('dictionary_table', 'value', '1');
4848
print lookup('dictionary_table', 'value', '100', 'default');
49+
dictionary_source_table | project start_range, t = lookup('dictionary_table', 'value', '1'), key

0 commit comments

Comments
 (0)