[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/21436 --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/21436#discussion_r191313872 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala --- @@ -1021,21 +1021,33 @@ object SparkSession extends Logging { /** * Returns the active SparkSession for the current thread, returned by the builder. * + * @note Return None, when calling this function on executors + * * @since 2.2.0 */ def getActiveSession: Option[SparkSession] = { -assertOnDriver() --- End diff -- `assertOnDriver` is a helpful method. It might be useful to the other scenarios in the future. Let us keep it. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/21436#discussion_r191050261 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala --- @@ -1021,21 +1021,33 @@ object SparkSession extends Logging { /** * Returns the active SparkSession for the current thread, returned by the builder. * + * @note Return None, when calling this function on executors + * * @since 2.2.0 */ def getActiveSession: Option[SparkSession] = { -assertOnDriver() --- End diff -- shall we remove the `assertOnDriver` method? --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...
GitHub user gatorsmile opened a pull request: https://github.com/apache/spark/pull/21436 [SPARK-24250][SQL][Follow-up] support accessing SQLConf inside tasks ## What changes were proposed in this pull request? We should not stop users from calling `getActiveSession` and `getDefaultSession` in executors. To not break the existing behaviors, we should simply return None. ## How was this patch tested? N/A You can merge this pull request into a Git repository by running: $ git pull https://github.com/gatorsmile/spark followUpSPARK-24250 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21436.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 #21436 commit 82a0f8754dd874435039506365841d4c0734c0d6 Author: Xiao LiDate: 2018-05-26T00:14:39Z fix --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org