You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by weiqingy <gi...@git.apache.org> on 2017/05/16 00:33:34 UTC

[GitHub] spark pull request #17989: [SPARK-6628][SQL][Branch-1.6] Fix ClassCastExcept...

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org