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

    https://github.com/apache/spark/pull/18875#discussion_r137281077
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonGenerator.scala
 ---
    @@ -22,24 +22,49 @@ import java.io.Writer
     import com.fasterxml.jackson.core._
     
     import org.apache.spark.sql.catalyst.InternalRow
    +import org.apache.spark.sql.catalyst.analysis.TypeCheckResult
     import org.apache.spark.sql.catalyst.expressions.SpecializedGetters
     import org.apache.spark.sql.catalyst.util.{ArrayData, DateTimeUtils, 
MapData}
     import org.apache.spark.sql.types._
     
     private[sql] class JacksonGenerator(
    --- End diff --
    
    We should add comment for `JacksonGenerator`. E.g.,
    
        `JackGenerator` can only be initialized with a `StructType` or a 
`MapType`.  Once it is initialized with
        `StructType`, it can be used to write out a struct or an array of 
struct. Once it is initialized with `MapType`, it can be used to write out a 
map. An exception will be thrown if trying to write out a struct if it is 
initialized with a `MapType`, and vice verse.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to