beliefer commented on a change in pull request #35803:
URL: https://github.com/apache/spark/pull/35803#discussion_r824335792



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala
##########
@@ -294,4 +295,30 @@ class QueryExecutionErrorsSuite extends QueryTest
     assert(e.getMessage ===
       "Datetime operation overflow: add 1000000 YEAR to 
'2022-03-09T09:02:03Z'.")
   }
+
+  test("UNSUPPORTED_OPERATION - SPARK-38504: can't read TimestampNTZ as 
TimestampLTZ") {
+    val data = (1 to 10).map { i =>
+      // The second parameter is `nanoOfSecond`, while java.sql.Timestamp 
accepts milliseconds
+      // as input. So here we multiple the `nanoOfSecond` by NANOS_PER_MILLIS
+      val ts = LocalDateTime.ofEpochSecond(0, i * 1000000, ZoneOffset.UTC)

Review comment:
       OK




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

To unsubscribe, e-mail: [email protected]

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