You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Evaluate set operations left to right with INTERSECT binding tighter, with a dialect keeping the old order #202
Regenerate src/alasqlparser.js with the pinned jison.
What stays the same
Queries with one set operation, chains of only UNION or only UNION ALL, and parenthesised groups.
With alasql/dialect/v4 every chain gives the 4.x result.
In the default, chains of two or more different operators change.
Done when
A new test file named after this issue has these cases, with e4 = {2, 5}, and the same queries with alasql/dialect/v4 giving the 4.x rows.
Query
Today
Expected
e1 UNION e2 EXCEPT e3
{1,2,3,4}
{1,2,4}
e1 EXCEPT e2 UNION e3
{2,4}
{2,3,4,5}
e2 UNION ALL e3 EXCEPT e4
{1,3,5}
{1,3}
e1 EXCEPT e2 EXCEPT e3 EXCEPT e4
{2,3,4}
{4}
It also covers INTERSECT after UNION and after EXCEPT, and parenthesised groups on both sides.
The set operation matrix in the dialect test against SQLite covers chains of three with mixed operators. The only expected differences are where SQLite's equal precedence differs from the standard.
The full test suite and the CI checks (dialect test, parity check, run-state check, binding check) pass, and the pull request lists every parity difference.
The INTERSECT operator has higher precedence than the UNION and EXCEPT operators. Therefore, in the absence of parentheses, INTERSECT operations are always evaluated first.
changed the title [-]Fix multiple EXCEPT problem[/-][+]Evaluate set operations left to right with INTERSECT binding tighter, with a dialect keeping the old order[/+]on Nov 26, 2026
Activity
agershun commentedon May 19, 2015
mathiasrw commentedon Jul 27, 2015
Any news on this?
Keep the existing set operation tests and add the left-to-right ones
Check set operations after a parenthesized chain when detecting corre…
[-]Fix multiple EXCEPT problem[/-][+]Evaluate set operations left to right with INTERSECT binding tighter, with a dialect keeping the old order[/+]