pan3793 commented on code in PR #42336:
URL: https://github.com/apache/spark/pull/42336#discussion_r1286544346
##########
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveFileFormat.scala:
##########
@@ -122,6 +130,23 @@ class HiveFileFormat(fileSinkConf: FileSinkDesc)
case _ => true
}
}
+
+ private def configureFileExtension(conf: Configuration): Unit = {
+ fileSinkConf.getTableInfo.getOutputFileFormatClassName match {
+ case "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"
+ if SQLConf.get.getConf(HiveUtils.HIVE_PARQUET_FILE_EXTENSION_ENABLED)
=>
+ conf.set("hive.output.file.extension",
+ CodecConfig.from(new JobConf(conf)).getCodec.getExtension +
".parquet")
Review Comment:
@melihsozdinler thanks for the suggestion, I'd love to do such refactoring
as long as the community intends to accept this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]