Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7696#discussion_r36157421
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/json/JacksonGenerator.scala ---
    @@ -74,4 +76,60 @@ private[sql] object JacksonGenerator {
     
         valWriter(rowSchema, row)
       }
    +
    +  /** Transforms a single InternalRow to JSON using Jackson
    +   *
    +   * TODO: make the code shared with the other apply method.
    +   *
    +   * @param rowSchema the schema object used for conversion
    +   * @param gen a JsonGenerator object
    +   * @param row The row to convert
    +   */
    +  def apply(rowSchema: StructType, gen: JsonGenerator, row: InternalRow): 
Unit = {
    --- End diff --
    
    The logic here is exactly the same with function `def apply(rowSchema: 
StructType, gen: JsonGenerator, row: Row)`, not sure if there any simple way to 
make the code shared.


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