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

    https://github.com/apache/spark/pull/20937#discussion_r178427458
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JsonFileFormat.scala
 ---
    @@ -151,7 +153,16 @@ private[json] class JsonOutputWriter(
         context: TaskAttemptContext)
       extends OutputWriter with Logging {
     
    -  private val writer = CodecStreams.createOutputStreamWriter(context, new 
Path(path))
    +  private val charset = options.charset match {
    +    case Some(charsetName) => Charset.forName(charsetName)
    +    case _ => StandardCharsets.UTF_8
    +  }
    +
    +  private val writer = CodecStreams.createOutputStreamWriter(
    +    context,
    +    new Path(path),
    +    charset
    +  )
    --- End diff --
    
    Seems it's going to fit in two lines.


---

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

Reply via email to