Github user weiqingy commented on a diff in the pull request:
https://github.com/apache/spark/pull/17989#discussion_r116631706
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveWriterContainers.scala ---
@@ -70,8 +70,11 @@ private[hive] class SparkHiveWriterContainer(
@transient protected lazy val committer = conf.value.getOutputCommitter
@transient protected lazy val jobContext = newJobContext(conf.value,
jID.value)
@transient private lazy val taskContext =
newTaskAttemptContext(conf.value, taID.value)
- @transient private lazy val outputFormat =
- conf.value.getOutputFormat.asInstanceOf[HiveOutputFormat[AnyRef,
Writable]]
+ @transient private lazy val outputFormat = conf.value.getOutputFormat
match {
--- End diff --
outputFormat is only used in `[Utilities.getFileExtension(conf.value,
fileSinkConf.getCompressed,
outputFormat)](https://github.com/weiqingy/spark/blob/0fa2bb791d1fa9c37fe89c1942ce0ed950a9ee59/sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveWriterContainers.scala#L96)`
to get the file extension. If `outputFormat` is "null", the extension will be
"".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]