{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/20927","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/20927/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/20927/comments","events_url":"https://api.github.com/repos/apache/spark/issues/20927/events","html_url":"https://github.com/apache/spark/pull/20927","id":309556524,"number":20927,"title":"[SPARK-23809][SQL] Active SparkSession should be set by getOrCreate","user":{"login":"ericl","id":14922,"avatar_url":"https://avatars3.githubusercontent.com/u/14922?v=4","gravatar_id":"","url":"https://api.github.com/users/ericl","html_url":"https://github.com/ericl","followers_url":"https://api.github.com/users/ericl/followers","following_url":"https://api.github.com/users/ericl/following{/other_user}","gists_url":"https://api.github.com/users/ericl/gists{/gist_id}","starred_url":"https://api.github.com/users/ericl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericl/subscriptions","organizations_url":"https://api.github.com/users/ericl/orgs","repos_url":"https://api.github.com/users/ericl/repos","events_url":"https://api.github.com/users/ericl/events{/privacy}","received_events_url":"https://api.github.com/users/ericl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-28T22:35:08Z","updated_at":"2018-03-30T04:13:45Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20927","html_url":"https://github.com/apache/spark/pull/20927","diff_url":"https://github.com/apache/spark/pull/20927.diff","patch_url":"https://github.com/apache/spark/pull/20927.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nCurrently, the active spark session is set inconsistently (e.g., in createDataFrame, prior to query execution). Many places in spark also incorrectly query active session when they should be calling activeSession.getOrElse(defaultSession) and so might get None even if a Spark session exists.\r\n\r\nThe semantics here can be cleaned up if we also set the active session when the default session is set.\r\n\r\nRelated: https://github.com/apache/spark/pull/20926/files\r\n\r\n## How was this patch tested?\r\n\r\nUnit test, existing test. Note that if https://github.com/apache/spark/pull/20926 merges first we should also update the tests there."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/377440835","html_url":"https://github.com/apache/spark/pull/20927#issuecomment-377440835","issue_url":"https://api.github.com/repos/apache/spark/issues/20927","id":377440835,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T04:13:45Z","updated_at":"2018-03-30T04:13:45Z","author_association":"NONE","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88724/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}