cloud-fan commented on code in PR #45537:
URL: https://github.com/apache/spark/pull/45537#discussion_r1596818126
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala:
##########
@@ -215,6 +215,21 @@ abstract class JdbcDialect extends Serializable with
Logging {
toJavaTimestampNoRebase(micros)
}
+ /**
+ * Returns a calendar that will be used when reading (rs.getTimestamp) or
+ * writing to the database (setTimestamp). If the calendar is None, old code
path
+ * in [[JdbcUtils]] will be hit and calendar won't be used.
+ * @return
+ */
+ @Since("3.5.0")
+ def getDatabaseCalendar: Option[Calendar] = {
+ if (SQLConf.get.useLocalSessionCalendar) {
Review Comment:
we should not access conf here. If a dialect overrides it, the conf won't be
affective.
--
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]