grammars-v4
grammars-v4 copied to clipboard
[Hive grammer] Fix the priority problem of 'BETWEEN AND' and 'AND'
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: