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

    https://github.com/apache/spark/pull/19218#discussion_r143624210
  
    --- 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 --
    
    In fact, the following process will check the correctness of this value, 
and because "orcoptions" is not accessable here, I have to add the 
"uncompressed" => "NONE" conversion.
    Do you have any good advice?


---

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

Reply via email to