xuanyuanking commented on a change in pull request #27537:
[WIP][SPARK-30668][SQL][FOLLOWUP] Raise exception instead of silent change for
new TimestampFormatter
URL: https://github.com/apache/spark/pull/27537#discussion_r377439705
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/DateFunctionsSuite.scala
##########
@@ -589,14 +588,10 @@ class DateFunctionsSuite extends QueryTest with
SharedSparkSession {
val ts4 = Timestamp.valueOf("2015-07-24 00:10:00")
val df1 = Seq(x1, x2, x3, x4).toDF("x")
- checkAnswer(df1.select(unix_timestamp(col("x"))), Seq(
- Row(secs(ts1.getTime)), Row(null), Row(null), Row(null)))
- checkAnswer(df1.selectExpr("unix_timestamp(x)"), Seq(
- Row(secs(ts1.getTime)), Row(null), Row(null), Row(null)))
- checkAnswer(df1.select(unix_timestamp(col("x"), "yyyy-dd-MM HH:mm:ss")),
Seq(
- Row(null), Row(secs(ts2.getTime)), Row(null), Row(null)))
- checkAnswer(df1.selectExpr(s"unix_timestamp(x, 'yyyy-MM-dd mm:HH:ss')"),
Seq(
- Row(secs(ts4.getTime)), Row(null), Row(secs(ts3.getTime)), Row(null)))
+ checkExceptionMessage(df1.select(unix_timestamp(col("x"))))
Review comment:
These changes will be reverted after #27524.
----------------------------------------------------------------
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]