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 return SQL is invalid for BigQuery #875

Closed
grieve54706 opened this issue Oct 31, 2024 · 2 comments · Fixed by #891
Closed

Wren Core return SQL is invalid for BigQuery #875

grieve54706 opened this issue Oct 31, 2024 · 2 comments · Fixed by #891
Assignees
Labels
bug Something isn't working core

Comments

@grieve54706
Copy link
Contributor

grieve54706 commented Oct 31, 2024

Description

The statement

SELECT ABS(o_orderkey) FROM my_catalog.my_schema.orders

Be transformed to

SELECT abs(orders.o_orderkey) FROM (SELECT orders.o_orderkey FROM (SELECT tpch_tiny.orders.o_orderkey AS o_orderkey FROM tpch_tiny.orders) AS orders) AS orders

Error message

Unrecognized name: tpch_tiny at [1:75]

It can't execute on BigQuery because the tpch_tiny.orders.o_orderkey should be orders.o_orderkey. Can not be with schema.

SELECT ABS(orders.o_orderkey) FROM (SELECT orders.o_orderkey FROM (SELECT orders.o_orderkey AS o_orderkey FROM tpch_tiny.orders) AS orders) AS orders;
@grieve54706 grieve54706 added bug Something isn't working core labels Oct 31, 2024
@grieve54706 grieve54706 changed the title Wren Core incorrectly convert SQL Wren Core return SQL is invalid for BigQuery Nov 1, 2024
@grieve54706
Copy link
Contributor Author

But it's worked for Postgres.

@goldmedal
Copy link
Contributor

It will be fixed by apache/datafusion#13241

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

Successfully merging a pull request may close this issue.

2 participants