[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user ueshin commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r223953269 --- Diff: python/pyspark/sql/session.py --- @@ -156,7 +156,7 @@ def getOrCreate(self): default. >>> s1 = SparkSession.builder.config("k1", "v1").getOrCreate() ->>> s1.conf.get("k1") == s1.sparkContext.getConf().get("k1") == "v1" +>>> s1.conf.get("k1") == "v1" --- End diff -- Submitted a pr to update the migration guide #22682. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r223415446 --- Diff: python/pyspark/sql/session.py --- @@ -156,7 +156,7 @@ def getOrCreate(self): default. >>> s1 = SparkSession.builder.config("k1", "v1").getOrCreate() ->>> s1.conf.get("k1") == s1.sparkContext.getConf().get("k1") == "v1" +>>> s1.conf.get("k1") == "v1" --- End diff -- We can do it together. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r223408456 --- Diff: python/pyspark/sql/session.py --- @@ -156,7 +156,7 @@ def getOrCreate(self): default. >>> s1 = SparkSession.builder.config("k1", "v1").getOrCreate() ->>> s1.conf.get("k1") == s1.sparkContext.getConf().get("k1") == "v1" +>>> s1.conf.get("k1") == "v1" --- End diff -- In that case, we might have to put the behaviour changes by https://github.com/apache/spark/pull/18536 together to the migration guide as well. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r223397858 --- Diff: python/pyspark/sql/session.py --- @@ -156,7 +156,7 @@ def getOrCreate(self): default. >>> s1 = SparkSession.builder.config("k1", "v1").getOrCreate() ->>> s1.conf.get("k1") == s1.sparkContext.getConf().get("k1") == "v1" +>>> s1.conf.get("k1") == "v1" --- End diff -- @ueshin Could we also update the migration guide about this change? --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/22545 --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r220784330 --- Diff: python/pyspark/sql/session.py --- @@ -181,17 +181,11 @@ def getOrCreate(self): sparkConf.set(key, value) sc = SparkContext.getOrCreate(sparkConf) # This SparkContext may be an existing one. --- End diff -- tiny nit: can we move this comment above `sc = ...` --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/22545#discussion_r220414608 --- Diff: python/pyspark/sql/context.py --- @@ -485,7 +485,8 @@ def __init__(self, sparkContext, jhiveContext=None): "SparkSession.builder.enableHiveSupport().getOrCreate() instead.", DeprecationWarning) if jhiveContext is None: -sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate() +sparkContext._conf.set("spark.sql.catalogImplementation", "hive") +sparkSession = SparkSession.builder._sparkContext(sparkContext).getOrCreate() --- End diff -- why this change? --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22545: [SPARK-25525][SQL][PYSPARK] Do not update conf fo...
GitHub user ueshin opened a pull request: https://github.com/apache/spark/pull/22545 [SPARK-25525][SQL][PYSPARK] Do not update conf for existing SparkContext in SparkSession.getOrCreate. ## What changes were proposed in this pull request? In [SPARK-20946](https://issues.apache.org/jira/browse/SPARK-20946), we modified `SparkSession.getOrCreate` to not update conf for existing `SparkContext` because `SparkContext` is shared by all sessions. We should not update it in PySpark side as well. ## How was this patch tested? Added tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ueshin/apache-spark issues/SPARK-25525/not_update_existing_conf Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22545.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22545 commit 52584d943c63839089293c8ceb9e0d844fe6492d Author: Takuya UESHIN Date: 2018-09-25T11:18:12Z Do not update conf for existing SparkContext in SparkSession.getOrCreate. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org