Ngone51 commented on a change in pull request #26595: [SPARK-29956][SQL] A 
literal number with an exponent should be parsed to Double
URL: https://github.com/apache/spark/pull/26595#discussion_r347898356
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/ansi/literals.sql.out
 ##########
 @@ -213,9 +219,15 @@ 
struct<0.3:decimal(1,1),-0.8:decimal(1,1),0.5:decimal(1,1),-0.18:decimal(2,2),0.
 -- !query 22
 select 123456789012345678901234567890123456789e10d, 
123456789012345678901234567890123456789.1e10d
 -- !query 22 schema
-struct<1.2345678901234568E48:double,1.2345678901234568E48:double>
+struct<>
 -- !query 22 output
-1.2345678901234568E48  1.2345678901234568E48
 
 Review comment:
   No, I just realize that a bug has been introduced in `numericLiteral()` if 
we simply use `contains(E)` to recognize exponent value. Because we also have 
`DIGIT+ EXPONENT? 'D'`, e.g. 10E2D, for double, which results in collision.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to