Open
Description
Grammar or Syntax Description
BigQuery supports a non-standard extension to UNION ALL
that includes FULL OUTER UNION ALL BY NAME
. This construct allows combining multiple SELECT queries by matching column names instead of relying on column order, and filling in NULLs for missing columns.
Currently, JSQLParser does not support parsing this syntax. It results in the following error:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "FULL"
SQL Example
- Simplified Query Example, focusing on the failing feature:
SELECT 1 as b FULL OUTER UNION ALL BY NAME SELECT 2 as a
Additional context
Database/Platform: Google BigQuery
Official Docs:
https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#union
Metadata
Metadata
Assignees
Labels
No labels