-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support spark type-hinted number literals
- Loading branch information
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
-- source: https://spark.apache.org/docs/latest/sql-ref-literals.html#integral-literal-syntax | ||
-- see: https://github.com/tconbeer/sqlfmt/issues/640 | ||
SELECT -2147483648 AS col; | ||
SELECT 9223372036854775807l AS col; | ||
SELECT -32Y AS col; | ||
SELECT 482S AS col; | ||
SELECT 12.578 AS col; | ||
SELECT -0.1234567 AS col; | ||
SELECT -.1234567 AS col; | ||
SELECT 123. AS col; | ||
SELECT 123.BD AS col; | ||
SELECT 5E2 AS col; | ||
SELECT 5D AS col; | ||
SELECT -5BD AS col; | ||
SELECT 12.578e-2d AS col; | ||
SELECT -.1234567E+2BD AS col; | ||
SELECT +3.e+3 AS col; | ||
SELECT -3.E-3D AS col; | ||
)))))__SQLFMT_OUTPUT__((((( | ||
-- source: | ||
-- https://spark.apache.org/docs/latest/sql-ref-literals.html#integral-literal-syntax | ||
-- see: https://github.com/tconbeer/sqlfmt/issues/640 | ||
select -2147483648 as col | ||
; | ||
select 9223372036854775807l as col | ||
; | ||
select -32Y as col | ||
; | ||
select 482S as col | ||
; | ||
select 12.578 as col | ||
; | ||
select -0.1234567 as col | ||
; | ||
select -.1234567 as col | ||
; | ||
select 123. as col | ||
; | ||
select 123.BD as col | ||
; | ||
select 5E2 as col | ||
; | ||
select 5D as col | ||
; | ||
select -5BD as col | ||
; | ||
select 12.578e-2d as col | ||
; | ||
select -.1234567E+2BD as col | ||
; | ||
select +3.e+3 as col | ||
; | ||
select -3.E-3D as col | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters