Open manlon opened 8 months ago
I found the reason for this here https://github.com/tconbeer/sqlfmt/issues/468 , but it's totally catastrophic when formatting duckdb queries with this op unfortunately
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)
//
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.Expected behavior valid
//
operation passes through unchangedActual behavior
//
is changed to--
as aboveAdditional context What is the output of
sqlfmt --version
?