mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fixed parsing of tuple element expression [#METR-18149].
This commit is contained in:
parent
f08a5aba80
commit
fbc7c1f40a
@ -94,6 +94,8 @@ bool ParserList::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_p
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
auto prev_pos = pos;
|
||||||
|
|
||||||
ws.ignore(pos, end);
|
ws.ignore(pos, end);
|
||||||
if (!separator_parser->ignore(pos, end, max_parsed_pos, expected))
|
if (!separator_parser->ignore(pos, end, max_parsed_pos, expected))
|
||||||
break;
|
break;
|
||||||
@ -101,7 +103,10 @@ bool ParserList::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_p
|
|||||||
|
|
||||||
ASTPtr elem;
|
ASTPtr elem;
|
||||||
if (!elem_parser->parse(pos, end, elem, max_parsed_pos, expected))
|
if (!elem_parser->parse(pos, end, elem, max_parsed_pos, expected))
|
||||||
return false;
|
{
|
||||||
|
pos = prev_pos;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
list->children.push_back(elem);
|
list->children.push_back(elem);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user