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

    https://github.com/apache/spark/pull/19218#discussion_r142553277
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/SaveAsHiveFile.scala
 ---
    @@ -68,6 +68,26 @@ private[hive] trait SaveAsHiveFile extends 
DataWritingCommand {
             .get("mapreduce.output.fileoutputformat.compress.type"))
         }
     
    +    fileSinkConf.tableInfo.getOutputFileFormatClassName match {
    +      case formatName if formatName.endsWith("ParquetOutputFormat") =>
    +        val compressionConf = "parquet.compression"
    +        val compressionCodec = getCompressionByPriority(fileSinkConf, 
compressionConf,
    +          sparkSession.sessionState.conf.parquetCompressionCodec) match {
    +          case "NONE" => "UNCOMPRESSED"
    +          case _@x => x
    +        }
    +        hadoopConf.set(compressionConf, compressionCodec)
    +      case formatName if formatName.endsWith("OrcOutputFormat") =>
    +        val compressionConf = "orc.compress"
    +        val compressionCodec = getCompressionByPriority(fileSinkConf, 
compressionConf,
    +          sparkSession.sessionState.conf.orcCompressionCodec) match {
    +          case "UNCOMPRESSED" => "NONE"
    +          case _@x => x
    --- End diff --
    
    `case x => x`?


---

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

Reply via email to