Closed
Description
Describe the bug
The following query fails parsing in v4.1, while it worked with previous versions.
It seems that the parser fails only when the two queries in the union are wrapped with parenthesis.
Parser fails with:
SELECT
*
FROM
(
(
SELECT
A
FROM
tbl
)
UNION
DISTINCT (
SELECT
B
FROM
tbl2
)
) AS union1
Parser doesn't fail with:
SELECT
*
FROM
(
SELECT
A
FROM
tbl
UNION
DISTINCT
SELECT
B
FROM
tbl2
) AS union1