Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/22089#discussion_r230609486
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
---
@@ -98,6 +98,7 @@ class CastSuite extends SparkFunSuite with
ExpressionEvalHelper {
c.set(Calendar.MILLISECOND, 0)
checkEvaluation(Cast(Literal("2015-03-18"), DateType), new
Date(c.getTimeInMillis))
checkEvaluation(Cast(Literal("2015-03-18 "), DateType), new
Date(c.getTimeInMillis))
+ checkEvaluation(Cast(Literal(" 2015-03-18"), DateType), new
Date(c.getTimeInMillis))
--- End diff --
> SELECT CAST(' 22-OCT-1997' AS TIMESTAMP) FROM dual;
Oracle also trims the leading space.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]