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

Cannot create a view with a query that ends in semicolon #300

Open
ohaibbq opened this issue Apr 11, 2024 · 0 comments · May be fixed by #301
Open

Cannot create a view with a query that ends in semicolon #300

ohaibbq opened this issue Apr 11, 2024 · 0 comments · May be fixed by #301
Labels
bug Something isn't working

Comments

@ohaibbq
Copy link
Contributor

ohaibbq commented Apr 11, 2024

What happened?

failed to parse statements: failed to parse statement: INVALID_ARGUMENT: Syntax error: Expected ")" but got ";" [type.googleapis.com/zetasql.ErrorLocation='\x08\x07\x10.']

What did you expect to happen?

View to be created successfully

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

	if err := view.Create(ctx, &bigquery.TableMetadata{
		Name: viewName,
		ViewQuery: `WITH table_rows AS (
					SELECT "Blueberry Muffins" AS item, 2 AS orders
				)
				SELECT item, COUNT(*) AS total_count
				FROM table_rows
				GROUP BY item, orders
				ORDER BY item;`,
	}); err != nil {
		t.Fatal(err)
	}

Anything else we need to know?

No response

@ohaibbq ohaibbq added the bug Something isn't working label Apr 11, 2024
@ohaibbq ohaibbq linked a pull request Apr 11, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant