PabloRMira / sql_formatter

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

PARTITION BY with newline not properly formatted #135

Closed PabloRMira closed 3 years ago

PabloRMira commented 3 years ago

Describe the bug

Something like this

create or replace table my_table as
select asdf, qwer OVER (
PARTITION BY asdf ORDER BY qwer
)
From table1

gets formatted as

CREATE OR REPLACE TABLE my_table AS
SELECT asdf, 
       qwer OVER ( PARTITION BY asdf
                             ORDER BY qwer)
FROM   table1

so the whitespaces between ( and PARTITION BY should be removed