spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HyukjinKwon <...@git.apache.org>
Subject [GitHub] spark pull request #22646: [SPARK-25654][SQL] Support for nested JavaBean ar...
Date Mon, 15 Oct 2018 01:46:09 GMT
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22646#discussion_r225021394
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -1115,9 +1126,38 @@ object SQLContext {
                 })
             }
         }
    -    def createConverter(cls: Class[_], dataType: DataType): Any => Any = dataType
match {
    -      case struct: StructType => createStructConverter(cls, struct.map(_.dataType))
    -      case _ => CatalystTypeConverters.createToCatalystConverter(dataType)
    +    def createConverter(t: Type, dataType: DataType): Any => Any = (t, dataType) match
{
    +      case (cls: Class[_], struct: StructType) =>
    --- End diff --
    
    wait .. can we reuse `JavaTypeInference.serializerFor` and make a projection, rather then
reimplementing whole logics here?


---

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


Mime
View raw message