Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8982#discussion_r41439584
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -278,3 +279,32 @@ case object MsSqlServerDialect extends JdbcDialect {
         } else None
       }
     }
    +
    +/**
    + * :: DeveloperApi ::
    + * Default Apache Derby dialect, mapping real on read
    + * and string/byte/short/boolean/decimal on write.
    + */
    +@DeveloperApi
    +case object DerbyDialect extends JdbcDialect {
    +  override def canHandle(url: String): Boolean = 
url.startsWith("jdbc:derby")
    +  override def getCatalystType(
    +    sqlType: Int, typeName: String, size: Int, md: MetadataBuilder): 
Option[DataType] = {
    +    if (sqlType == Types.REAL) {
    --- End diff --
    
    either
    ```scala
    if (sqlType == Types.REAL) Option(FloatType) else None
    ```
    or
    ```scala
    if (sqlType == Types.REAL) {
      Option(FloatType)
    } else {
      None
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to