Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/18536#discussion_r125699077
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala ---
@@ -102,11 +102,9 @@ class SparkSessionBuilderSuite extends SparkFunSuite {
assert(session.conf.get("key1") == "value1")
assert(session.conf.get("key2") == "value2")
assert(session.sparkContext == sparkContext2)
- assert(session.sparkContext.conf.get("key1") == "value1")
- // If the created sparkContext is not passed through the Builder's API
sparkContext,
- // the conf of this sparkContext will also contain the conf set
through the API config.
- assert(session.sparkContext.conf.get("key2") == "value2")
- assert(session.sparkContext.conf.get("spark.app.name") == "test")
+ // We won't update conf for existing `SparkContext`
+ assert(!sparkContext2.conf.contains("key2"))
+ assert(sparkContext2.conf.get("key1") == "value1")
--- End diff --
This PR makes the behaviors consistent. To build a SparkSession, we behave
consistently no matter whether the spark context is implicitly chosen or
explicitly passed by users. I think we need to fix it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]