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

    https://github.com/apache/spark/pull/21439#discussion_r204274790
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
 ---
    @@ -101,6 +102,17 @@ class JacksonParser(
         }
       }
     
    +  private def makeArrayRootConverter(at: ArrayType): JsonParser => 
Seq[InternalRow] = {
    +    val elemConverter = makeConverter(at.elementType)
    +    (parser: JsonParser) => parseJsonToken[Seq[InternalRow]](parser, at) {
    +      case START_ARRAY => Seq(InternalRow(convertArray(parser, 
elemConverter)))
    +      case START_OBJECT if at.elementType.isInstanceOf[StructType] =>
    --- End diff --
    
    I think it is a super weird case...can we put this special handling code 
for back-compatibility in `JsonToStructs`?
    Ether way, I think we should leave code comments here to make others 
understood easily?


---

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

Reply via email to