You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/13 11:50:17 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #32144: [SPARK-35044][SQL] Support retrieve hadoop configurations via SET syntax

cloud-fan commented on a change in pull request #32144:
URL: https://github.com/apache/spark/pull/32144#discussion_r612374123



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala
##########
@@ -146,7 +146,9 @@ case class SetCommand(kv: Option[(String, Option[String])])
     // Queries a single property.
     case Some((key, None)) =>
       val runFunc = (sparkSession: SparkSession) => {
-        val value = sparkSession.conf.getOption(key).getOrElse("<undefined>")
+        val value = sparkSession.conf.getOption(key).getOrElse {
+          sparkSession.sharedState.hadoopConf.get(key, "<undefined>")

Review comment:
       Can we make the PR title clearer? It seems the SET command can already set/get hadoop configs in the SQLConf. The only problem is we don't display the default value correctly, which is from `sparkSession.sharedState.hadoopConf`.
   
   BTW do we have a valid use case? e.g. a hadoop conf is not in `SQLConf` but in `sparkSession.sharedState.hadoopConf`.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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