stevomitric commented on code in PR #57698:
URL: https://github.com/apache/spark/pull/57698#discussion_r3751433606
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -233,7 +244,15 @@ object JdbcUtils extends Logging with SQLConfHelper {
else TimeType.DEFAULT_PRECISION
TimeType(timePrecision)
} else getTimestampType(isTimestampNTZ)
- case java.sql.Types.TIMESTAMP => getTimestampType(isTimestampNTZ)
+ case java.sql.Types.TIMESTAMP =>
+ // When nanosecond timestamps are requested (and the preview feature is
enabled), a driver
+ // TIMESTAMP that reports a sub-microsecond fractional-second scale
(7-9) is mapped to the
+ // nanosecond-capable type. Otherwise the historical microsecond mapping
is preserved.
+ if (preferTimestampNanos && conf.timestampNanosTypesEnabled &&
Review Comment:
moved the scale-bound checks
--
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]