{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8111","labels_url":"https://api.github.com/repos/apache/spark/issues/8111/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8111/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8111/events","html_url":"https://github.com/apache/spark/pull/8111","id":100402798,"number":8111,"title":"[SPARK-9580] [SQL] [WIP] Replace singletons in SQL tests","user":{"login":"andrewor14","id":2133137,"avatar_url":"https://avatars.githubusercontent.com/u/2133137?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewor14","html_url":"https://github.com/andrewor14","followers_url":"https://api.github.com/users/andrewor14/followers","following_url":"https://api.github.com/users/andrewor14/following{/other_user}","gists_url":"https://api.github.com/users/andrewor14/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewor14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewor14/subscriptions","organizations_url":"https://api.github.com/users/andrewor14/orgs","repos_url":"https://api.github.com/users/andrewor14/repos","events_url":"https://api.github.com/users/andrewor14/events{/privacy}","received_events_url":"https://api.github.com/users/andrewor14/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":74,"created_at":"2015-08-11T20:35:01Z","updated_at":"2015-08-12T07:43:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8111","html_url":"https://github.com/apache/spark/pull/8111","diff_url":"https://github.com/apache/spark/pull/8111.diff","patch_url":"https://github.com/apache/spark/pull/8111.patch"},"body":"A fundamental limitation of the existing SQL tests is that *there is simply no way to create your own `SparkContext`*. This is a serious limitation because the user may wish to use a different master or config. As a case in point, `BroadcastJoinSuite` is entirely commented out because there is no way to make it pass with the existing infrastructure.\r\n\r\nThis patch removes the singletons `TestSQLContext` and `TestData`, and instead introduces a `SharedSQLContext` that starts a context per suite. Unfortunately the singletons were so ingrained in the SQL tests that this patch necessarily needed to touch *all* the SQL test files.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/apache/spark/8111)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/130204242","html_url":"https://github.com/apache/spark/pull/8111#issuecomment-130204242","issue_url":"https://api.github.com/repos/apache/spark/issues/8111","id":130204242,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T07:43:40Z","updated_at":"2015-08-12T07:43:40Z","body":"  [Test build #1480 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1480/consoleFull) for   PR 8111 at commit [`94f9c77`](https://github.com/apache/spark/commit/94f9c77960c7c4bd8ae0623c845b6aa250324fb8)."}}