GitHub user vijoshi opened a pull request: https://github.com/apache/spark/pull/16119
reuse SparkSession if sparkContext specified same as active one ## What changes were proposed in this pull request? Change is for SQLContext to reuse the active SparkSession during construction if the sparkContext supplied is the same as the currently active SparkContext. Without this change, a new SparkSession is instantiated that results in a Derby error when attempting to create a dataframe using a new SQLContext object even though the SparkContext supplied to the new is same as the currently active one. Refer https://issues.apache.org/jira/browse/SPARK-18687 for details on the error and a repro. ## How was this patch tested? Existing unit tests are successful: /python/run-tests --python-executables=python --modules=pyspark-sql Please review http://spark.apache.org/contributing.html before opening a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vijoshi/spark SPARK-18687_master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16119.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 #16119 ---- commit d0585d82acc2fcf180b9f694f092fede6201a4db Author: Vinayak <vijos...@in.ibm.com> Date: 2016-12-02T09:48:25Z reuse SparkSession if sparkContext specified same as active one ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org