gatorsmile commented on a change in pull request #23068: [SPARK-26098][WebUI] Show associated SQL query in Job page URL: https://github.com/apache/spark/pull/23068#discussion_r240305749
########## File path: core/src/main/scala/org/apache/spark/ui/jobs/JobPage.scala ########## @@ -189,14 +189,19 @@ private[ui] class JobPage(parent: JobsTab, store: AppStatusStore) extends WebUIP require(parameterId != null && parameterId.nonEmpty, "Missing id parameter") val jobId = parameterId.toInt - val jobData = store.asOption(store.job(jobId)).getOrElse { + val (jobData, sqlExecutionId) = store.asOption(store.jobWithAssociatedSql(jobId)).getOrElse { val content = <div id="no-info"> <p>No information to display for job {jobId}</p> </div> return UIUtils.headerSparkPage( request, s"Details for Job $jobId", content, parent) } + val sqlDetailUrl = sqlExecutionId.map { id => Review comment: Add a code comment to explain when `sqlExecutionId ` can be None. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org