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

Recognise using as a keyword #218

Closed
nfcampos opened this issue Jul 31, 2022 · 1 comment · Fixed by #226
Closed

Recognise using as a keyword #218

nfcampos opened this issue Jul 31, 2022 · 1 comment · Fixed by #226
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@nfcampos
Copy link

(sqlfmt is amazing, exactly what I was after.)

Describe the bug
It seems that currently using isn't recognised as a keyword, resulting in slightly odd formatting when used in a join clause see below. No space between using and the list of columns makes it look like a function call, which is confusing

To Reproduce

select a_column, b_column, c_column, d_column
from table_a
left outer join table_b using (id, something_else)

Expected behavior

select a_column, b_column, c_column, d_column
from table_a
left outer join table_b using (id, something_else)

Actual behavior

select a_column, b_column, c_column, d_column
from table_a
left outer join table_b using(id, something_else)

Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.9.0

@tconbeer
Copy link
Owner

tconbeer commented Aug 1, 2022

For some reason I thought the canonical formatting of using was without a space, but checking the docs for a few dialects, I see that is wrong. This shouldn't be hard to fix. Thanks for the report!

@tconbeer tconbeer added the bug Something isn't working label Aug 1, 2022
@tconbeer tconbeer added this to the v0.10.1 milestone Aug 2, 2022
@tconbeer tconbeer added the good first issue Good for newcomers label Aug 2, 2022
tconbeer added a commit that referenced this issue Aug 2, 2022
* fix #218: add a space between using and bracket

* chore: update primer and changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants