srowen commented on a change in pull request #23958: [SPARK-27045] SQL tab in 
UI shows actual SQL instead of callsite
URL: https://github.com/apache/spark/pull/23958#discussion_r263418543
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala
 ##########
 @@ -71,13 +73,21 @@ object SQLExecution {
       // streaming queries would give us call site like "run at <unknown>:0"
       val callSite = sc.getCallSite()
 
+      val desc = Option(sparkSession.sparkContext
+        .getLocalProperty(SparkContext.SPARK_JOB_DESCRIPTION)) match {
+        case value : Some[String] =>
 
 Review comment:
   Nit: `case Some(value) =>` and then you don't need `.get`.
   I think this should be indented another unit, or else move the 
`getLocalProperty` call into a `val` above. Then the Option-match-Some-None 
pattern is kind of superfluous. Just check for null.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to