[
https://issues.apache.org/jira/browse/SPARK-35446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347993#comment-17347993
]
Takeshi Yamamuro commented on SPARK-35446:
------------------------------------------
Oh, I was a bit surprised that mysql treats real as double... Anyway, the
proposal sounds good. do you wanna open a PR to fix this?
> Override getJDBCType in MySQLDialect to map FloatType to FLOAT
> --------------------------------------------------------------
>
> Key: SPARK-35446
> URL: https://issues.apache.org/jira/browse/SPARK-35446
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.1.1
> Reporter: Marios Meimaris
> Priority: Major
>
> In
> [https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala#L165,]
> FloatType is mapped to REAL. However, MySQL treats REAL as a synonym to
> DOUBLE by default (see
> [https://dev.mysql.com/doc/refman/8.0/en/numeric-types.html] for more
> information).
> `MySQLDialect` could override `getJDBCType` so that it maps FloatType to
> FLOAT instead.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]