cloud-fan commented on code in PR #45537:
URL: https://github.com/apache/spark/pull/45537#discussion_r1596819133
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -500,7 +501,7 @@ object JdbcUtils extends Logging with SQLConfHelper {
case TimestampType =>
(rs: ResultSet, row: InternalRow, pos: Int) =>
- val t = rs.getTimestamp(pos + 1)
+ val t = rs.getTimestamp(pos + 1, dialect.getDatabaseCalendar.get)
Review Comment:
let's avoid per row access
```
val calendar = if (conf....) {
dialect.getDatabaseCalendar
} else {
null
}
(rs: ResultSet, row: InternalRow, pos: Int) => ...
```
--
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]