You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/07 23:03:53 UTC
[GitHub] [spark] luxu1-ms commented on a change in pull request #32655: [WIP][SPARK-33743]change TimestampType match to datetime2 instead of datetime for MsSQLServerDialect
luxu1-ms commented on a change in pull request #32655:
URL: https://github.com/apache/spark/pull/32655#discussion_r646996403
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/MsSqlServerDialect.scala
##########
@@ -56,7 +56,7 @@ private object MsSqlServerDialect extends JdbcDialect {
}
override def getJDBCType(dt: DataType): Option[JdbcType] = dt match {
- case TimestampType => Some(JdbcType("DATETIME", java.sql.Types.TIMESTAMP))
+ case TimestampType => Some(JdbcType("DATETIME2", java.sql.Types.TIMESTAMP))
Review comment:
The old Spark versions maps to datetime, which is compatible with datetime2. datatime2 will also allow more digits of milliseconds.
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org