You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/11/04 23:02:54 UTC

[GitHub] spark pull request #22089: [SPARK-25098][SQL]���Cast��� will return NULL whe...

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: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org