Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/19218#discussion_r157481061
--- 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") =>
--- End diff --
`case formatName if formatName.toLowerCase.endsWith("orcoutputformat") =>`?
Or, you write
`fileSinkConf.tableInfo.getOutputFileFormatClassName.toLowerCase match {`, then
each match does not convert lower-case conversion?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]