{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/60800495","id":60800495,"diff_hunk":"@@ -1026,21 +1025,7 @@ class SparkILoop(\n   }\n \n   @DeveloperApi\n-  def createSQLContext(): SQLContext = {\n-    val name = \"org.apache.spark.sql.hive.HiveContext\"\n-    val loader = Utils.getContextOrSparkClassLoader\n-    try {\n-      sqlContext = loader.loadClass(name).getConstructor(classOf[SparkContext])\n-        .newInstance(sparkContext).asInstanceOf[SQLContext]\n-      logInfo(\"Created sql context (with Hive support)..\")\n-    }\n-    catch {\n-      case _: java.lang.ClassNotFoundException | _: java.lang.NoClassDefFoundError =>\n-        sqlContext = new SQLContext(sparkContext)\n-        logInfo(\"Created sql context..\")\n-    }\n-    sqlContext\n-  }\n+  def createSparkSession(): SparkSession = Main.createSparkSession()","path":"repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkILoop.scala","position":36,"original_position":36,"commit_id":"8642cd7e606999c9d40a1c6936566846858fd9d5","original_commit_id":"8642cd7e606999c9d40a1c6936566846858fd9d5","user":{"login":"yhuai","id":2072857,"avatar_url":"https://avatars.githubusercontent.com/u/2072857?v=3","gravatar_id":"","url":"https://api.github.com/users/yhuai","html_url":"https://github.com/yhuai","followers_url":"https://api.github.com/users/yhuai/followers","following_url":"https://api.github.com/users/yhuai/following{/other_user}","gists_url":"https://api.github.com/users/yhuai/gists{/gist_id}","starred_url":"https://api.github.com/users/yhuai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhuai/subscriptions","organizations_url":"https://api.github.com/users/yhuai/orgs","repos_url":"https://api.github.com/users/yhuai/repos","events_url":"https://api.github.com/users/yhuai/events{/privacy}","received_events_url":"https://api.github.com/users/yhuai/received_events","type":"User","site_admin":false},"body":"Does scala 2.10's Main have `createSparkSession`?","created_at":"2016-04-22T20:45:10Z","updated_at":"2016-04-22T20:45:10Z","html_url":"https://github.com/apache/spark/pull/12589#discussion_r60800495","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/12589","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/60800495"},"html":{"href":"https://github.com/apache/spark/pull/12589#discussion_r60800495"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/12589"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12589","id":67441627,"html_url":"https://github.com/apache/spark/pull/12589","diff_url":"https://github.com/apache/spark/pull/12589.diff","patch_url":"https://github.com/apache/spark/pull/12589.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/12589","number":12589,"state":"open","locked":false,"title":"[SPARK-14828][SQL] Start SparkSession in REPL instead of SQLContext","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},"body":"## What changes were proposed in this pull request?\r\n\r\n```\r\nSpark context available as 'sc' (master = local[*], app id = local-1461283768192).\r\nSpark session available as 'spark'.\r\nWelcome to\r\n      ____              __\r\n     / __/__  ___ _____/ /__\r\n    _\\ \\/ _ \\/ _ `/ __/  '_/\r\n   /___/ .__/\\_,_/_/ /_/\\_\\   version 2.0.0-SNAPSHOT\r\n      /_/\r\n         \r\nUsing Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51)\r\nType in expressions to have them evaluated.\r\nType :help for more information.\r\n\r\nscala> sql(\"SHOW TABLES\").collect()\r\n16/04/21 17:09:39 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.2.0\r\n16/04/21 17:09:39 WARN ObjectStore: Failed to get database default, returning NoSuchObjectException\r\nres0: Array[org.apache.spark.sql.Row] = Array([src,false])\r\n\r\nscala> sql(\"SHOW TABLES\").collect()\r\nres1: Array[org.apache.spark.sql.Row] = Array([src,false])\r\n\r\nscala> spark.createDataFrame(Seq((1, 1), (2, 2), (3, 3)))\r\nres2: org.apache.spark.sql.DataFrame = [_1: int, _2: int]\r\n```\r\n\r\nHive things are loaded lazily.\r\n\r\n## How was this patch tested?\r\n\r\nManual.\r\n","created_at":"2016-04-22T00:10:15Z","updated_at":"2016-04-22T20:45:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3241bd1d98f9889604b08f4834682ccb67b84e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/12589/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/12589/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/12589/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/8642cd7e606999c9d40a1c6936566846858fd9d5","head":{"label":"andrewor14:spark-session-repl","ref":"spark-session-repl","sha":"8642cd7e606999c9d40a1c6936566846858fd9d5","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},"repo":{"id":17231517,"name":"spark","full_name":"andrewor14/spark","owner":{"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},"private":false,"html_url":"https://github.com/andrewor14/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/andrewor14/spark","forks_url":"https://api.github.com/repos/andrewor14/spark/forks","keys_url":"https://api.github.com/repos/andrewor14/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewor14/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewor14/spark/teams","hooks_url":"https://api.github.com/repos/andrewor14/spark/hooks","issue_events_url":"https://api.github.com/repos/andrewor14/spark/issues/events{/number}","events_url":"https://api.github.com/repos/andrewor14/spark/events","assignees_url":"https://api.github.com/repos/andrewor14/spark/assignees{/user}","branches_url":"https://api.github.com/repos/andrewor14/spark/branches{/branch}","tags_url":"https://api.github.com/repos/andrewor14/spark/tags","blobs_url":"https://api.github.com/repos/andrewor14/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewor14/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewor14/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewor14/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewor14/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewor14/spark/languages","stargazers_url":"https://api.github.com/repos/andrewor14/spark/stargazers","contributors_url":"https://api.github.com/repos/andrewor14/spark/contributors","subscribers_url":"https://api.github.com/repos/andrewor14/spark/subscribers","subscription_url":"https://api.github.com/repos/andrewor14/spark/subscription","commits_url":"https://api.github.com/repos/andrewor14/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewor14/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewor14/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewor14/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewor14/spark/contents/{+path}","compare_url":"https://api.github.com/repos/andrewor14/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewor14/spark/merges","archive_url":"https://api.github.com/repos/andrewor14/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewor14/spark/downloads","issues_url":"https://api.github.com/repos/andrewor14/spark/issues{/number}","pulls_url":"https://api.github.com/repos/andrewor14/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewor14/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewor14/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewor14/spark/labels{/name}","releases_url":"https://api.github.com/repos/andrewor14/spark/releases{/id}","deployments_url":"https://api.github.com/repos/andrewor14/spark/deployments","created_at":"2014-02-27T00:52:37Z","updated_at":"2015-05-08T06:53:12Z","pushed_at":"2016-04-22T20:32:47Z","git_url":"git://github.com/andrewor14/spark.git","ssh_url":"git@github.com:andrewor14/spark.git","clone_url":"https://github.com/andrewor14/spark.git","svn_url":"https://github.com/andrewor14/spark","homepage":null,"size":172392,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"df1953f0df8b43136157a18bea05fd6750906f68","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-04-22T16:18:27Z","pushed_at":"2016-04-22T20:42:21Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":467722,"stargazers_count":8250,"watchers_count":8250,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7629,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":451,"forks":7629,"open_issues":451,"watchers":8250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/12589"},"html":{"href":"https://github.com/apache/spark/pull/12589"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/12589"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/12589/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/12589/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/12589/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/8642cd7e606999c9d40a1c6936566846858fd9d5"}}}}