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

    https://github.com/apache/spark/pull/2762#discussion_r18819746
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala ---
    @@ -135,26 +139,66 @@ private[hive] trait HiveInspectors {
               unwrapData(si.getStructFieldData(data,r), 
r.getFieldObjectInspector)).toArray)
       }
     
    -  /** Converts native catalyst types to the types expected by Hive */
    -  def wrap(a: Any): AnyRef = a match {
    -    case s: String => s: java.lang.String
    -    case i: Int => i: java.lang.Integer
    -    case b: Boolean => b: java.lang.Boolean
    -    case f: Float => f: java.lang.Float
    -    case d: Double => d: java.lang.Double
    -    case l: Long => l: java.lang.Long
    -    case l: Short => l: java.lang.Short
    -    case l: Byte => l: java.lang.Byte
    -    case b: BigDecimal => new HiveDecimal(b.underlying())
    -    case b: Array[Byte] => b
    -    case t: java.sql.Timestamp => t
    -    case s: Seq[_] => seqAsJavaList(s.map(wrap))
    -    case m: Map[_,_] =>
    -      // Some UDFs seem to assume we pass in a HashMap.
    -      val hashMap = new java.util.HashMap[AnyRef, AnyRef]()
    -      hashMap.putAll(m.map { case (k, v) => wrap(k) -> wrap(v) })
    -      hashMap
    -    case null => null
    +  /**
    +   * Converts native catalyst types to the types expected by Hive
    +   * @param a the value to be wrapped
    +   * @param oi the destination ObjectInspector, which supposed to be the 
ObjectInspector enumerated
    +   *           in functions:
    +   *           def toInspector(dataType: DataType)
    +   *           def def toInspector(expr: Expression)
    --- End diff --
    
    Remove duplicated `def`.


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