You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/12/02 23:19:14 UTC
[GitHub] spark pull request #19218: [SPARK-21786][SQL] The 'spark.sql.parquet.compres...
Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19218#discussion_r154509645
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/SaveAsHiveFile.scala ---
@@ -68,6 +68,30 @@ private[hive] trait SaveAsHiveFile extends DataWritingCommand {
.get("mapreduce.output.fileoutputformat.compress.type"))
}
+ fileSinkConf.tableInfo.getOutputFileFormatClassName match {
+ case formatName if formatName.toLowerCase.endsWith("parquetoutputformat") =>
+ val compressionConf = "parquet.compression"
+ val compressionCodec = getCompressionByPriority(
+ fileSinkConf,
+ compressionConf,
+ default = 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"
--- End diff --
-> `OrcRelation.ORC_COMPRESSION`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org