mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Make it work #4228
This commit is contained in:
parent
8e564a616c
commit
69b84380f2
@ -242,8 +242,12 @@ bool ParserBetweenExpression::parseImpl(Pos & pos, ASTPtr & node, Expected & exp
|
||||
if (!elem_parser.parse(pos, subject, expected))
|
||||
return false;
|
||||
|
||||
bool negative = s_not.ignore(pos, expected);
|
||||
|
||||
if (!s_between.ignore(pos, expected))
|
||||
{
|
||||
node = subject;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!elem_parser.parse(pos, left, expected))
|
||||
@ -271,16 +275,16 @@ bool ParserBetweenExpression::parseImpl(Pos & pos, ASTPtr & node, Expected & exp
|
||||
args_right_expr->children.emplace_back(subject);
|
||||
args_right_expr->children.emplace_back(right);
|
||||
|
||||
// NOT BETWEEN
|
||||
if (s_not.ignore(pos, expected))
|
||||
if (negative)
|
||||
{
|
||||
/// NOT BETWEEN
|
||||
f_left_expr->name = "less";
|
||||
f_right_expr->name = "greater";
|
||||
f_combined_expression->name = "or";
|
||||
}
|
||||
// BETWEEN
|
||||
else
|
||||
{
|
||||
/// BETWEEN
|
||||
f_left_expr->name = "greaterOrEquals";
|
||||
f_right_expr->name = "lessOrEquals";
|
||||
f_combined_expression->name = "and";
|
||||
|
Loading…
Reference in New Issue
Block a user