mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
clickhouse: fixed parsing lambda expressions [#CONV-7444].
This commit is contained in:
parent
4a19d688dd
commit
c7ecc266c6
@ -215,17 +215,24 @@ bool ParserLambdaExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, String
|
|||||||
ASTPtr inner_arguments;
|
ASTPtr inner_arguments;
|
||||||
ASTPtr expression;
|
ASTPtr expression;
|
||||||
|
|
||||||
if (!open.ignore(pos, end, expected))
|
bool was_open = false;
|
||||||
break;
|
|
||||||
ws.ignore(pos, end, expected);
|
if (open.ignore(pos, end, expected))
|
||||||
|
{
|
||||||
|
ws.ignore(pos, end, expected);
|
||||||
|
was_open = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ParserList(new ParserIdentifier, new ParserString(",")).parse(pos, end, inner_arguments, expected))
|
if (!ParserList(new ParserIdentifier, new ParserString(",")).parse(pos, end, inner_arguments, expected))
|
||||||
break;
|
break;
|
||||||
ws.ignore(pos, end, expected);
|
ws.ignore(pos, end, expected);
|
||||||
|
|
||||||
if (!close.ignore(pos, end, expected))
|
if (was_open)
|
||||||
break;
|
{
|
||||||
ws.ignore(pos, end, expected);
|
if (!close.ignore(pos, end, expected))
|
||||||
|
break;
|
||||||
|
ws.ignore(pos, end, expected);
|
||||||
|
}
|
||||||
|
|
||||||
if (!arrow.ignore(pos, end, expected))
|
if (!arrow.ignore(pos, end, expected))
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user