Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16870#discussion_r100723941
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DateFunctionsSuite.scala ---
    @@ -500,6 +527,23 @@ class DateFunctionsSuite extends QueryTest with 
SharedSQLContext {
           Row(date1.getTime / 1000L), Row(date2.getTime / 1000L)))
         checkAnswer(df.selectExpr(s"to_unix_timestamp(s, '$fmt')"), Seq(
           Row(ts1.getTime / 1000L), Row(ts2.getTime / 1000L)))
    +
    +    val x1 = "2015-07-24 10:00:00"
    +    val x2 = "2015-25-07 02:02:02"
    +    val x3 = "2015-07-24 25:02:02"
    +    val x4 = "2015-24-07 26:02:02"
    +    val ts3 = Timestamp.valueOf("2015-07-24 02:25:02")
    +    val ts4 = Timestamp.valueOf("2015-07-24 00:10:00")
    +
    +    val df1 = Seq(x1, x2, x3, x4).toDF("x")
    +    checkAnswer(df1.selectExpr("to_unix_timestamp(x)"), Seq(
    +      Row(ts1.getTime / 1000L), Row(null), Row(null), Row(null)))
    --- End diff --
    
    the same with above~


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to