SparkSQL numeric & fractional literals not supported
Closed this issue · 1 comments
ShaneMazur commented
Describe the bug
SparkSQL allows for numeric literals as described here. sqlfmt breaks sparkSQL code that uses this feature
To Reproduce
-- Unformatted
select -32y as col -- indicates TINYINT, which is a 1-byte signed integer number
;
-- Formatted
select -32 y as col -- errors out as the numeric literal must immediately follow the number
;
Expected behavior
Produce working formatted code with the same behaviour as the unformatted code
Actual behavior
Produces unusable sparkSQL code
Additional context
What is the output of sqlfmt --version
?
sqlfmt, version 0.23.2
What is the output of pip list
(or pipx list
if you installed using pipx)?
pip_list.txt
tconbeer commented
Thanks for the issue and the link to the docs!