You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/10/15 04:13:00 UTC

[jira] [Assigned] (SPARK-32991) RESET can clear StaticSQLConfs

     [ https://issues.apache.org/jira/browse/SPARK-32991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-32991:
------------------------------------

    Assignee:     (was: Apache Spark)

> RESET can clear StaticSQLConfs
> ------------------------------
>
>                 Key: SPARK-32991
>                 URL: https://issues.apache.org/jira/browse/SPARK-32991
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.1
>            Reporter: Herman van Hövell
>            Priority: Major
>
> 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:
> {code:java}
> // 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!
> {code}
> The problem is that RESET assumes it can use the SparkContext's configurations as its default.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org