dongjoon-hyun commented on code in PR #45666:
URL: https://github.com/apache/spark/pull/45666#discussion_r1535814994


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala:
##########
@@ -123,6 +123,8 @@ private case class MySQLDialect() extends JdbcDialect with 
SQLConfHelper {
         // Signed values in [-8388608, 8388607] and unsigned values in [0, 
16777215],
         // both of them fit IntegerType
         Some(IntegerType)
+      case Types.REAL | Types.FLOAT =>
+        if (md.build().getBoolean("isSigned")) Some(FloatType) else 
Some(DoubleType)

Review Comment:
   Just a question. We are safe even if MySQL community remove UNSIGNED FLOAT , 
right?
   - https://dev.mysql.com/doc/refman/8.3/en/numeric-type-syntax.html
   > The UNSIGNED attribute is deprecated for columns of type 
[FLOAT](https://dev.mysql.com/doc/refman/8.3/en/floating-point-types.html) (and 
any synonyms) and you should expect support for it to be removed in a future 
version of MySQL.
   
   Although it's a separate question, do you think we need to warn from our 
side, @yaooqinn ?



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

Reply via email to