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_r351089338
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -473,13 +473,15 @@ class ExpressionParserSuite extends AnalysisTest {
// Decimal
testDecimal("7873247234798249279371.2334")
- // Scientific Decimal
- testDecimal("9.0e1")
- testDecimal(".9e+2")
- testDecimal("0.9e+2")
- testDecimal("900e-1")
- testDecimal("900.0E-1")
- testDecimal("9.e+1")
+ // SPARK-29956: Scientific Decimal is parsed as Double by default.
+ assertEqual("9.0e1", Literal(90.toDouble))
+ assertEqual(".9e+2", Literal(90.toDouble))
+ assertEqual("0.9e+2", Literal(90.toDouble))
Review comment:
Added ca56ceb
----------------------------------------------------------------
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]