Description
The RESET command can clear a sessions' static SQL configurations, when that static SQL configuration was set on a SparkSession that uses a pre-existing SparkContext. Here is repro:
// Blow away any pre-existing session thread locals org.apache.spark.sql.SparkSession.clearDefaultSession() org.apache.spark.sql.SparkSession.clearActiveSession() // Create new session and explicitly set a spark context val newSession = org.apache.spark.sql.SparkSession.builder .sparkContext(sc) .config("spark.sql.globalTempDatabase", "bob") .getOrCreate() assert(newSession.conf.get("spark.sql.globalTempDatabase") == "bob") newSession.sql("reset") assert(newSession.conf.get("spark.sql.globalTempDatabase") == "bob") // Boom!
The problem is that RESET assumes it can use the SparkContext's configurations as its default.
Attachments
Issue Links
- is blocked by
-
SPARK-33718 SharedState shall be an system-wide singleton
- In Progress
- links to