sqlparse icon indicating copy to clipboard operation
sqlparse copied to clipboard

Formatting After Function Column Fill Does Not Align

Open Jonnokc opened this issue 4 years ago • 0 comments

When formatting the column alignment fails if a column is populated with a date function like CURRENT_DATE.

version: sqlparse-0.3.1

Example: this is the output after formatting.

SELECT 'value 1' AS VALUE_1,
       CURRENT_DATE AS CREATED_AT,
                       'testing' AS VALUE_2,
                       'testing2' AS VALUE_3,
FROM TABLE_1

Expected behavior is for all columns to align.

SELECT 'value 1' AS VALUE_1,
       CURRENT_DATE AS CREATED_AT,
       'testing' AS VALUE_2,
       'testing2' AS VALUE_3,
FROM TABLE_1

Jonnokc avatar May 23 '20 18:05 Jonnokc