File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sql/hive/src/main/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,11 @@ private[hive] class SparkHiveWriterContainer(
7878 @ transient protected lazy val committer = conf.value.getOutputCommitter
7979 @ transient protected lazy val jobContext = new JobContextImpl (conf.value, jID.value)
8080 @ transient private lazy val taskContext = new TaskAttemptContextImpl (conf.value, taID.value)
81- @ transient private lazy val outputFormat =
82- conf.value.getOutputFormat.asInstanceOf [HiveOutputFormat [AnyRef , Writable ]]
81+ @ transient private lazy val outputFormat = conf.value.getOutputFormat match {
82+ case format : HiveOutputFormat [AnyRef , Writable ]
83+ => format.asInstanceOf [HiveOutputFormat [AnyRef , Writable ]]
84+ case _ => null
85+ }
8386
8487 def driverSideSetup () {
8588 setIDs(0 , 0 , 0 )
You can’t perform that action at this time.
0 commit comments