You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/14 20:47:10 UTC

[GitHub] [spark] jose-torres opened a new pull request #26114: [SPARK-29468][SQL] Change Literal.sql to be correct for floats.

jose-torres opened a new pull request #26114: [SPARK-29468][SQL] Change Literal.sql to be correct for floats.
URL: https://github.com/apache/spark/pull/26114
 
 
   ### What changes were proposed in this pull request?
   Change Literal.sql to output CAST('fpValue' AS FLOAT) instead of CAST(fpValue AS FLOAT) as the SQL for a floating point literal.
   
   ### Why are the changes needed?
   The old version doesn't work for very small floating point numbers; the value will fail to parse if it doesn't fit in a DECIMAL(38).
   
   This doesn't apply to doubles because they have special literal syntax.
   
   
   ### Does this PR introduce any user-facing change?
   Not really.
   
   ### How was this patch tested?
   New unit tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org