Details
Description
Spark SQL current sets the scheduler pool and job description AFTER jobs run (see https://github.com/apache/spark/blob/master/sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala#L168 – which happens after calling hiveContext.sql). As a result, the description for a SQL job ends up being the SQL query corresponding to the previous job. This should be done before the job is run so the description is correct.