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

    https://github.com/apache/spark/pull/19492#discussion_r144754775
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
 ---
    @@ -89,6 +95,24 @@ class JacksonParser(
     
       /**
        * Create a converter which converts the JSON documents held by the 
`JsonParser`
    +   * to a value according to a desired schema. This is an overloaded 
method to the
    +   * previous one which allows to handle array of primitive types.
    +   */
    +  private def makeRootConverter(at: ArrayType): JsonParser => Seq[Any] = {
    +    (parser: JsonParser) => parseJsonToken[Seq[Any]](parser, at) {
    +      case START_ARRAY =>
    +        val array = convertArray(parser, makeConverter(at.elementType))
    --- End diff --
    
    Move `makeConverter` outside the inner function and so we can reuse it.


---

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

Reply via email to