You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (Jira)" <ji...@apache.org> on 2020/12/06 07:44:00 UTC
[jira] [Commented] (SPARK-32991) RESET can clear StaticSQLConfs
[ https://issues.apache.org/jira/browse/SPARK-32991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17244675#comment-17244675 ]
Xiao Li commented on SPARK-32991:
---------------------------------
[~Qin Yao] I reopened the Jira and set it to Blocker, because the follow-up PR is needed before the 3.1 release.
> 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
> Assignee: Kent Yao
> Priority: Blocker
> Fix For: 3.1.0
>
>
> 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