You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/30 05:29:07 UTC

[GitHub] [spark] leanken commented on a change in pull request #30540: [SPARK-33498][SQL][FOLLOW-UP] Deduplicate the unittest by using checkCastWithParseError

leanken commented on a change in pull request #30540:
URL: https://github.com/apache/spark/pull/30540#discussion_r532355292



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
##########
@@ -971,11 +971,7 @@ abstract class AnsiCastSuiteBase extends CastSuiteBase {
         checkCastWithParseError("20150318")
         checkCastWithParseError("2015-031-8")
         checkCastWithParseError("2015-03-18T12:03:17-0:70")
-
-        val input = "abdef"
-        checkExceptionInExpression[DateTimeException](
-          cast(input, TimestampType, Option(zid.getId)),
-          s"Cannot cast $input to TimestampType.")
+        checkCastWithParseError("abdef")

Review comment:
       OK. I got it, will try my best to avoid such issue in future.




----------------------------------------------------------------
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:
users@infra.apache.org



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