cloud-fan commented on a change in pull request #34712:
URL: https://github.com/apache/spark/pull/34712#discussion_r756887394
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala
##########
@@ -830,6 +830,27 @@ abstract class OrcQuerySuite extends OrcQueryTest with
SharedSparkSession {
}
}
}
+
+ test("SPARK-37463: read/write Timestamp ntz or ltz to Orc uses UTC
timestamp") {
+ TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"))
+ sql("set spark.sql.session.timeZone = America/Los_Angeles")
+
+ val df =
+ sql("select timestamp_ntz '2021-06-01 00:00:00' ts_ntz, timestamp
'2021-06-01 00:00:00' ts")
+
+ df.write.mode("overwrite").orc("ts_ntz_orc")
+ df.write.mode("overwrite").parquet("ts_ntz_parquet")
Review comment:
can we check with the actual result, instead of comparing with parquet?
--
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]