SuccessChanges

Summary

  1. [SPARK-25076][SQL] SQLConf should not be retrieved from a stopped (details)
Commit 9bfc55b1b0aae269320bb978027a800fd1878149 by gatorsmile
[SPARK-25076][SQL] SQLConf should not be retrieved from a stopped
SparkSession
## What changes were proposed in this pull request?
When a `SparkSession` is stopped, `SQLConf.get` should use the fallback
conf to avoid weird issues like
``` sbt.ForkMain$ForkError: java.lang.IllegalStateException:
LiveListenerBus is stopped.
at
org.apache.spark.scheduler.LiveListenerBus.addToQueue(LiveListenerBus.scala:97)
at
org.apache.spark.scheduler.LiveListenerBus.addToStatusQueue(LiveListenerBus.scala:80)
at
org.apache.spark.sql.internal.SharedState.<init>(SharedState.scala:93)
at
org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:120)
at
org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:120)
at scala.Option.getOrElse(Option.scala:121)
...
```
## How was this patch tested?
a new test suite
Closes #22056 from cloud-fan/session.
Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Xiao Li
<gatorsmile@gmail.com>
(cherry picked from commit fec67ed7e95483c5ea97a7b263ad4bea7d3d42b5)
Signed-off-by: Xiao Li <gatorsmile@gmail.com>
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/LocalSparkSession.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala (diff)
The file was addedsql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfGetterSuite.scala