MaxGekk commented on a change in pull request #35803:
URL: https://github.com/apache/spark/pull/35803#discussion_r825305085
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala
##########
@@ -294,4 +295,28 @@ 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") {
Review comment:
You could slightly simplify the test:
```scala
withTempPath { file =>
sql("select timestamp_ntz'2019-03-21
00:02:03'").write.orc(file.getCanonicalPath)
withAllNativeOrcReaders {
val e = intercept[SparkException] {
spark.read.schema("time
timestamp_ltz").orc(file.getCanonicalPath).collect()
}.getCause.asInstanceOf[SparkUnsupportedOperationException]
assert(e.getErrorClass === "UNSUPPORTED_OPERATION")
assert(e.getMessage === "The operation is not supported: " +
"Unable to convert timestamp ntz of Orc to data type
'timestamp_ltz'")
}
}
```
--
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]