spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #19567: [SPARK-22291][SQL] Postgresql UUID[] to Cassandra...
Date Fri, 27 Oct 2017 01:17:44 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19567#discussion_r147305034
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
---
    @@ -456,8 +456,17 @@ object JdbcUtils extends Logging {
     
             case StringType =>
               (array: Object) =>
    -            array.asInstanceOf[Array[java.lang.String]]
    -              .map(UTF8String.fromString)
    +            array match {
    +              case _: Array[java.lang.String] =>
    +                array.asInstanceOf[Array[java.lang.String]]
    +                  .map(UTF8String.fromString)
    +              case _: Array[java.util.UUID] =>
    +                array.asInstanceOf[Array[java.util.UUID]]
    --- End diff --
    
    Can this also be covered by the following `Array[java.lang.Object]`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message