hyrise/sql-parser

Correct parsing (operator precedence) for queries with nested set operations

klauck opened this issue · 0 comments

We should investigate all (edge) cases for queries with nested set operations.
This issue came up in #138.

In the current version Q1 EXCEPT Q2 EXCEPT Q3 == Q1 EXCEPT (Q2 EXCEPT Q3), which is a bug.
It should be Q1 EXCEPT Q2 EXCEPT Q3 == (Q1 EXCEPT Q2) EXCEPT Q3.

Further, INTERSECT binds more tightly than UNION and EXCEPT. [https://www.postgresql.org/docs/14/queries-union.html]
This is not yet implemented in the parser.