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
// is an integer division operator in duckdb sql https://duckdb.org/docs/sql/functions/numeric.html sqlfmt interprets this as the start of a comment and reformats it to -- with invalid results.
//
--
$ echo 'select 5 // 2;' | sqlfmt - select 5 -- 2; 1 file formatted. 0 files left unchanged. - formatted.
Expected behavior valid // operation passes through unchanged
Actual behavior // is changed to -- as above
Additional context What is the output of sqlfmt --version?
sqlfmt --version
sqlfmt, version 0.21.1
The text was updated successfully, but these errors were encountered:
I found the reason for this here #468 , but it's totally catastrophic when formatting duckdb queries with this op unfortunately
Sorry, something went wrong.
Yeah, this is unfortunate. I checked as many dialects as I could and thought we were in the clear with //
Will have to be fixed with either a snowflake specific or duckdb specific dialect.
Workaround would be a --fmt: off comment on a PRECEDING line (same line won't work unfortunately)
--fmt: off
No branches or pull requests
//
is an integer division operator in duckdb sql https://duckdb.org/docs/sql/functions/numeric.htmlsqlfmt interprets this as the start of a comment and reformats it to
--
with invalid results.Expected behavior
valid
//
operation passes through unchangedActual behavior
//
is changed to--
as aboveAdditional context
What is the output of
sqlfmt --version
?The text was updated successfully, but these errors were encountered: