You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Spotless SQL DBeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks and other places #2250
If you are submitting a bug, please include the following:
Hi Team,
We have a big side-effect of using DBeaver SQL formatter within spotless "as is".
When I run this formatter on valid Spark SQL code where column name is wrapped with backtick symbol, it puts whitespaces around column name making .sql valid INVALID for spark to run within spark.sql("sql-query-from-file")
It's easy to reproduce. Just create a simple SQL file within columns given below with backticks (see: Expected example) and you'll see it's formatter to "Current behavior" that is not valid syntax.
Versions:
Gradle v8+. No matter what version, it doesn't work!
Spotless v.6.25.0. No matter what version, it doesn't work!
changed the title [-]Spotless SQL dbeaver formatter produced NON valid syntax for query with backticks[/-][+]Spotless SQL dbeaver formatter produces INVALID sql syntax containing backticks[/+]on Sep 6, 2024
HI @nedtwigg thank you for marking as the BUG. I added "UPD" section and described that it's impossible for me to use Spotless SQL formatter anymore within Spark SQL syntax as I can't control how formatter puts a whitespace. It breaks SQL easily that is hard to track. Are there any possible workarounds?
Activity
[-]Spotless SQL dbeaver formatter produced NON valid syntax for query with backticks[/-][+]Spotless SQL dbeaver formatter produces INVALID sql syntax containing backticks[/+][-]Spotless SQL dbeaver formatter produces INVALID sql syntax containing backticks[/-][+]Spotless SQL dbeaver formatter produces INVALID sql syntax with whitespaces inside backticks[/+][-]Spotless SQL dbeaver formatter produces INVALID sql syntax with whitespaces inside backticks[/-][+]Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces inside backticks[/+][-]Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces inside backticks[/-][+]Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks[/+][-]Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks[/-][+]BUG: Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks[/+]ysoboliev commentedon Sep 16, 2024
HI @nedtwigg thank you for marking as the BUG. I added "UPD" section and described that it's impossible for me to use Spotless SQL formatter anymore within Spark SQL syntax as I can't control how formatter puts a whitespace. It breaks SQL easily that is hard to track. Are there any possible workarounds?
[-]BUG: Spotless SQL dbeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks[/-][+]BUG: Spotless SQL DBeaver formatter produces INVALID spark sql syntax with whitespaces added inside backticks and other places[/+]