Closed aersam closed 7 months ago
As with your other issue, I don't think my software is doing this. I can't reproduce this either locally or on sqlfmt.com. We test the double-quoted version of this here:
Very strange. I'm actually sure I'm on the right sqlfmt 🙂 I'll double check tomorrow
Describe the bug A clear and concise description of what the bug is.
Sqlfmt turns this:
select regexp_replace(trim(ms.id), r'([^0-9])', '') as supplier_id
into this:
select regexp_replace(trim(ms.id), r '([^0-9])', '') as supplier_id
Note the space after the r Literal.
r Modifiers are a Spark/Databricks Feature: https://spark.apache.org/docs/latest/sql-ref-literals.html#string-literal They must be placed immediately before the actual string
Expected behavior The r Modifier before a string literal should not have any space to the string literal.
Additional context What is the output of
sqlfmt --version
?sqlfmt, version 0.21.0
That beeing said, we use sqlfmt for 885 SQL Files and that's the only bug we're having, big thanks for that great tool!