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
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:
SELECT1.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:
SELECT1.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?
The text was updated successfully, but these errors were encountered: