grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

[Hive grammer] Fix the priority problem of 'BETWEEN AND' and 'AND'

Open jiefei30 opened this issue 2 years ago • 0 comments

Fix the priority problem of 'BETWEEN AND' expression and 'AND' logical operator. For example:

SELECT a FROM t1 WHERE a BETWEEN 1*2 AND 10 AND b IN (SELECT b FROM t2) AND c > 1

the old parse tree:

It can be clearly seen that the priorities of 'BETWEEN AND' expression and 'AND' logical operator are wrong, which may lead to errors in analysis

the new parse tree:

jiefei30 avatar Aug 16 '22 02:08 jiefei30