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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to