Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support for FULL OUTER UNION ALL BY NAME (Big Query) #2208

Open
SusanaCastela opened this issue Mar 27, 2025 · 0 comments
Open

[FEATURE] Support for FULL OUTER UNION ALL BY NAME (Big Query) #2208

SusanaCastela opened this issue Mar 27, 2025 · 0 comments

Comments

@SusanaCastela
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant