mariosmeim-db commented on a change in pull request #32605:
URL: https://github.com/apache/spark/pull/32605#discussion_r636159996



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala
##########
@@ -94,4 +94,23 @@ private case object MySQLDialect extends JdbcDialect {
   override def getTableCommentQuery(table: String, comment: String): String = {
     s"ALTER TABLE $table COMMENT = '$comment'"
   }
+
+  override def getJDBCType(dt: DataType): Option[JdbcType] = dt match {
+    case IntegerType => Option(JdbcType("INTEGER", java.sql.Types.INTEGER))

Review comment:
       Thanks for the comments. I think we need just one pattern match: 
   `case FloatType => Option(JdbcType("FLOAT", java.sql.Types.FLOAT))`
   
   That's because `DoubleType` is correctly mapped to `DOUBLE PRECISION` in 
`getCommonJDBCType`. WDYT?




-- 
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