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

chokes on create row access policy #633

Closed
tconbeer opened this issue Sep 18, 2024 · 0 comments · Fixed by #650
Closed

chokes on create row access policy #633

tconbeer opened this issue Sep 18, 2024 · 0 comments · Fixed by #650
Labels
bigquery bug Something isn't working

Comments

@tconbeer
Copy link
Owner

Describe the bug

sqlfmt encountered an error: There was a problem formatting your query that caused the safety check to fail. Please open an issue. Raw query was 24 tokens; formatted query was 24 tokens. First mismatching token at position 2: raw: TokenType.FMT_OFF; result: TokenType.NAME.

To Reproduce

create or replace row access policy foo
on foo.bar.baz
grant to ('user1', 'user2')
filter using ( foo = 'bar' )

Expected behavior
Should no-op as an unsupported ddl. But it doesn't. Adding -- fmt: off does not help.

Actual behavior
Safety check error.

Additional context
What is the output of sqlfmt --version? 0.21.3

What is the output of pip list (or pipx list if you installed using pipx)? with our without black installed.

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

Successfully merging a pull request may close this issue.

1 participant