mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix unary operators parsing
This commit is contained in:
parent
62d0d76f68
commit
fc8656ee9e
@ -2614,8 +2614,17 @@ Action ParserExpressionImpl::tryParseOperand(Layers & layers, IParser::Pos & pos
|
|||||||
|
|
||||||
if (cur_op != unary_operators_table.end())
|
if (cur_op != unary_operators_table.end())
|
||||||
{
|
{
|
||||||
layers.back()->pushOperator(cur_op->second);
|
if (pos->type == TokenType::OpeningRoundBracket)
|
||||||
return Action::OPERAND;
|
{
|
||||||
|
++pos;
|
||||||
|
auto identifier = std::make_shared<ASTIdentifier>(cur_op->second.function_name);
|
||||||
|
layers.push_back(getFunctionLayer(identifier, layers.front()->is_table_function));
|
||||||
|
return Action::OPERAND;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layers.back()->pushOperator(cur_op->second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto old_pos = pos;
|
auto old_pos = pos;
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
SELECT NOT (0) + NOT (0);
|
Loading…
Reference in New Issue
Block a user