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

Wren core transform SQL failed Unexpected keyword UNNEST #929

Open
grieve54706 opened this issue Nov 20, 2024 · 1 comment
Open

Wren core transform SQL failed Unexpected keyword UNNEST #929

grieve54706 opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working core

Comments

@grieve54706
Copy link
Contributor

Source

SELECT array_agg(x) FROM UNNEST([2, 1,-2, 3, -2, 1, 2]) AS t(x)

Planned

SELECT array_agg(t.x) FROM (SELECT UNNEST([2, 1, -2, 3, -2, 1, 2]) AS "UNNEST(make_array(Int64(2),Int64(1),Int64(-2),Int64(3),Int64(-2),Int64(1),Int64(2)))") AS t (x)

Dialect

SELECT ARRAY_AGG(t.x) FROM (SELECT UNNEST([2, 1, -2, 3, -2, 1, 2]) AS `UNNEST(make_array(Int64(2),Int64(1),Int64(-2),Int64(3),Int64(-2),Int64(1),Int64(2)))`) AS t

BigQuery error message

google.api_core.exceptions.BadRequest: 400 POST https://bigquery.googleapis.com/bigquery/v2/projects/wrenai/jobs?prettyPrint=false: Syntax error: Unexpected keyword UNNEST at [1:36]

We found the Wren core transform SQL to SELECT UNNEST from SELECT * FROM UNNEST.
But the BigQuery can not receive the statement SELECT UNNEST

@grieve54706 grieve54706 added the bug Something isn't working label Nov 20, 2024
@goldmedal goldmedal removed their assignment Nov 21, 2024
@goldmedal
Copy link
Contributor

related to apache/datafusion#13601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

No branches or pull requests

2 participants