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

UPDATE ... FROM ( SELECT ... ) results in the error: Update with joins not supported #310

Open
anonimitoraf opened this issue May 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@anonimitoraf
Copy link

anonimitoraf commented May 2, 2024

What happened?

This query runs fine in actual BigQuery, but results in an error failed to analyze: INVALID_ARGUMENT: Update with joins not supported in the emulator:

UPDATE `my_table`
SET description = 'new'
FROM (SELECT 'record1' as xId) AS xs
WHERE id = xs.xId;

What did you expect to happen?

I expected the query to not result in an error. Instead it should update record1

How can we reproduce it (as minimally and precisely as possible)?

  • Create a table my_table with description and id columns (both strings)
  • Run the query:
UPDATE `my_table`
SET description = 'new'
FROM (SELECT 'record1' as xId) AS xs
WHERE id = xs.xId;

Anything else we need to know?

I searched around for the exact error message both in this repo and https://github.com/goccy/go-zetasqlite but was unable to find anything. Why is this?

I also had a look at the supported functionality list but was unable to find anything on this.

@anonimitoraf anonimitoraf added the bug Something isn't working label May 2, 2024
@anonimitoraf anonimitoraf changed the title Error encountered when UPDATE ... FROM ( SELECT ... ): failed to analyze: INVALID_ARGUMENT: Update with joins not supported UPDATE ... FROM ( SELECT ... ) results in the error: Update with joins not supported May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant