I've been using this and it's a great SQL formatter, working better for my particular use case than several others I have tried. However, I noticed today that numbers in scientific notation aren't supported. Consider the file example.sql:
SELECT
1.3e6 AS thirteen_hundred_thousand
That's valid in presto sql / amazon athena, at least; it evaluates to a double 130000.0. However, sleek 0.3.0 (called with no args) breaks this example script, reformatting it to:
SELECT
1.3 e6 AS thirteen_hundred_thousand
which then errors out in Athena, returning line 2:12: mismatched input 'AS'. Expecting: ',', 'EXCEPT', 'FETCH', 'FROM', 'GROUP', 'HAVING', 'INTERSECT', 'LIMIT', 'OFFSET', 'ORDER', 'UNION', 'WHERE', 'WINDOW', <EOF>.
I've been using this and it's a great SQL formatter, working better for my particular use case than several others I have tried. However, I noticed today that numbers in scientific notation aren't supported. Consider the file example.sql:
That's valid in presto sql / amazon athena, at least; it evaluates to a double
130000.0
. However, sleek 0.3.0 (called with no args) breaks this example script, reformatting it to:which then errors out in Athena, returning
line 2:12: mismatched input 'AS'. Expecting: ',', 'EXCEPT', 'FETCH', 'FROM', 'GROUP', 'HAVING', 'INTERSECT', 'LIMIT', 'OFFSET', 'ORDER', 'UNION', 'WHERE', 'WINDOW', <EOF>
.Is this an issue for sqlformat?