HyukjinKwon commented on a change in pull request #32605:
URL: https://github.com/apache/spark/pull/32605#discussion_r644477321
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala
##########
@@ -94,4 +95,11 @@ 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 {
+ // See SPARK-35446: MySQL treats REAL as a synonym to DOUBLE by default
+ // We override getJDBCType so that FloatType is mapped to FLOAT instead
+ case FloatType => Option(JdbcType("FLOAT", java.sql.Types.FLOAT))
Review comment:
@mariosmeim-db sorry one last thing. can we update migration guide too?
https://github.com/apache/spark/blob/master/docs/sql-migration-guide.md
--
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]