cloud-fan commented on a change in pull request #28671:
URL: https://github.com/apache/spark/pull/28671#discussion_r432244219
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala
##########
@@ -811,6 +811,63 @@ class HiveThriftBinaryServerSuite extends
HiveThriftJdbcTest {
}
}
}
+
+ test("SPARK-31859 Thriftserver works with
spark.sql.datetime.java8API.enabled=true") {
+ withJdbcStatement() { statement =>
+ withJdbcStatement() { st =>
+ st.execute("set spark.sql.datetime.java8API.enabled=true")
+ val rs = st.executeQuery("select date '2020-05-28', timestamp
'2020-05-28 00:00:00'")
+ rs.next()
+ assert(rs.getDate(1).toString() == "2020-05-28")
+ assert(rs.getTimestamp(2).toString() == "2020-05-28 00:00:00.0")
+ }
+ }
+ }
+
+ test("SPARK-31861 Thriftserver respects spark.sql.session.timeZone") {
+ withJdbcStatement() { statement =>
+ withJdbcStatement() { st =>
+ st.execute("set spark.sql.session.timeZone=+03:15") // different than
Thriftserver's JVM tz
+ val rs = st.executeQuery("select timestamp '2020-05-28 10:00:00'")
+ rs.next()
+ val ts = rs.getTimestamp(1)
+ val tsString = rs.getString(1)
Review comment:
this is not used.
----------------------------------------------------------------
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]