Skip to content

chokes on create row access policy #633

Closed
@tconbeer

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bigquerybugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions