You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2017/01/22 00:14:18 UTC

[GitHub] spark pull request #16579: [SPARK-19218][SQL] Fix SET command to show a resu...

Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16579#discussion_r97209831
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala ---
    @@ -79,16 +79,17 @@ case class SetCommand(kv: Option[(String, Option[String])]) extends RunnableComm
         // Queries all key-value pairs that are set in the SQLConf of the sparkSession.
         case None =>
           val runFunc = (sparkSession: SparkSession) => {
    -        sparkSession.conf.getAll.map { case (k, v) => Row(k, v) }.toSeq
    +        sparkSession.conf.getAll.toSeq.sorted.map { case (k, v) => Row(k, v) }
           }
           (keyValueOutput, runFunc)
     
         // Queries all properties along with their default values and docs that are defined in the
         // SQLConf of the sparkSession.
         case Some(("-v", None)) =>
           val runFunc = (sparkSession: SparkSession) => {
    -        sparkSession.sessionState.conf.getAllDefinedConfs.map { case (key, defaultValue, doc) =>
    -          Row(key, defaultValue, doc)
    +        sparkSession.sessionState.conf.getAllDefinedConfs.sorted.map {
    +          case (key, defaultValue, doc) =>
    +            Row(key, if (defaultValue == null) "null" else defaultValue, doc)
    --- End diff --
    
    This is the root cause to raise exceptions during decoding.


---
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