tconbeer/sqlfmt

chokes on `create row access policy`

Closed this issue · 0 comments

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.