We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Snowflake supports two other types of comments, // for single line comments and /* */ for multi-line comments. https://community.snowflake.com/s/article/how-to-comment-or-uncomment-multiple-lines-in-the-sql-worksheet Currently, /* */ is working correctly but, // is not being interpreted correctly.
//
/* */
To Reproduce Add any line with // as a comment. E.g.:
select * from {{ ref("events") }} e // join from events table left join {{ ref("users") }} u on u.id = e.user_id
Expected behavior Comment should be kept as is and other lines formatted. E.g.:
Actual behavior Files gets jumbled, breaking logic. E.g.:
select * from {{ ref("events") }} e / / join from events table left join {{ ref("users") }} u on u.id = e.user_id
Additional context sqlfmt, version 0.19.2
The text was updated successfully, but these errors were encountered:
What the hell -- why do we need like 10 ways to comment things in SQL.
Why would Snowflake bind ctrl+/ to //, which is only a comment in snowflake sql, instead of --? Ugh.
Sorry, something went wrong.
What the hell -- why do we need like 10 ways to comment things in SQL. Why would Snowflake bind ctrl+/ to //, which is only a comment in snowflake sql, instead of --? Ugh.
Yeah, I'm with you on that one. It just makes things look awful, and serves no purpose other than to make things more complicated to parse 😓
fix #468: support snowflake // comments
deb8469
63c0433
Successfully merging a pull request may close this issue.
Describe the bug
Snowflake supports two other types of comments,
//
for single line comments and/* */
for multi-line comments.https://community.snowflake.com/s/article/how-to-comment-or-uncomment-multiple-lines-in-the-sql-worksheet
Currently,
/* */
is working correctly but,//
is not being interpreted correctly.To Reproduce
Add any line with // as a comment. E.g.:
Expected behavior
Comment should be kept as is and other lines formatted. E.g.:
Actual behavior
Files gets jumbled, breaking logic. E.g.:
Additional context
sqlfmt, version 0.19.2
The text was updated successfully, but these errors were encountered: