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,9 +2614,18 @@ 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)
|
||||||
|
{
|
||||||
|
++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;
|
return Action::OPERAND;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layers.back()->pushOperator(cur_op->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto old_pos = pos;
|
auto old_pos = pos;
|
||||||
auto current_checkpoint = layers.back()->current_checkpoint;
|
auto current_checkpoint = layers.back()->current_checkpoint;
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
SELECT NOT (0) + NOT (0);
|
Loading…
Reference in New Issue
Block a user