PabloRMira / sql_formatter

A Python based SQL formatter
https://pablormira.github.io/sql_formatter/
Apache License 2.0
43 stars 10 forks source link

Formatter does not add space after comma #146

Closed PabloRMira closed 3 years ago

PabloRMira commented 3 years ago

Describe the bug

The formatter does not add a whitespace after comma if the user forgets it. I.e., the following query

select asdf, substr(asdf,1,2) as qwerty
from table1

gets formatted as

SELECT asdf, 
       substr(asdf,1,2) as qwerty
FROM table1

Expected:

SELECT asdf, 
       substr(asdf, 1, 2) as qwerty
FROM table1