cloud-fan commented on a change in pull request #32846:
URL: https://github.com/apache/spark/pull/32846#discussion_r648468606



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
##########
@@ -1711,6 +1708,17 @@ class CastSuite extends CastSuiteBase {
     }
   }
 
+  test("SPARK-35698: cast timestamp without time zone to string") {
+    Seq(
+      "0001-01-01 00:00:00", // the fist timestamp of Common Era
+      "1582-10-15 23:59:59", // the cutover date from Julian to Gregorian 
calendar
+      "1970-01-01 00:00:00", // the epoch timestamp
+      "9999-12-31 23:59:59"  // the last supported timestamp according to SQL 
standard
+    ).foreach { s =>
+      checkEvaluation(cast(LocalDateTime.parse(s.replace(" ", "T")), 
StringType), s)

Review comment:
       ah I see, got it




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to