{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13414","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13414/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13414/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13414/events","html_url":"https://github.com/apache/spark/pull/13414","id":157729199,"number":13414,"title":"[SPARK-15674][SQL] Deprecates \"CREATE TEMPORARY TABLE USING...\", uses \"CREAT TEMPORARY VIEW USING...\" instead","user":{"login":"clockfly","id":2595532,"avatar_url":"https://avatars.githubusercontent.com/u/2595532?v=3","gravatar_id":"","url":"https://api.github.com/users/clockfly","html_url":"https://github.com/clockfly","followers_url":"https://api.github.com/users/clockfly/followers","following_url":"https://api.github.com/users/clockfly/following{/other_user}","gists_url":"https://api.github.com/users/clockfly/gists{/gist_id}","starred_url":"https://api.github.com/users/clockfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clockfly/subscriptions","organizations_url":"https://api.github.com/users/clockfly/orgs","repos_url":"https://api.github.com/users/clockfly/repos","events_url":"https://api.github.com/users/clockfly/events{/privacy}","received_events_url":"https://api.github.com/users/clockfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-31T17:42:09Z","updated_at":"2016-05-31T19:27:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13414","html_url":"https://github.com/apache/spark/pull/13414","diff_url":"https://github.com/apache/spark/pull/13414.diff","patch_url":"https://github.com/apache/spark/pull/13414.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThe current implementation of \"CREATE TEMPORARY TABLE USING...\" is actually creating a temporary VIEW behind the scene. We should just use \"CREATE TEMPORARY VIEW USING...\" instead.\r\n\r\nExample:\r\n\r\n```\r\nscala> spark.sql(\"CREATE temporary view  my_tab7 (c1: String, c2: String)  USING org.apache.spark.sql.execution.datasources.csv.CSVFileFormat  OPTIONS (PATH '/Users/seanzhong/csv/cars.csv')\")\r\nscala> spark.sql(\"select c1, c2 from my_tab7\").show()\r\n+----+-----+\r\n|  c1|   c2|\r\n+----+-----+\r\n|year| make|\r\n|2012|Tesla|\r\n...\r\n```\r\n\r\nIt NOW prints a **deprecation warning** if \"CREATE TEMPORARY TABLE USING...\" is used.\r\n\r\n```\r\nscala> spark.sql(\"CREATE temporary table  my_tab7 (c1: String, c2: String)  USING org.apache.spark.sql.execution.datasources.csv.CSVFileFormat  OPTIONS (PATH '/Users/seanzhong/csv/cars.csv')\")\r\n16/05/31 10:39:27 WARN SparkStrategies$DDLStrategy: CREATE TEMPORARY TABLE tableName USING... is deprecated, please use CREATE TEMPORARY VIEW viewName USING... instead\r\n```\r\n\r\n\r\n## How was this patch tested?\r\n\r\nUnit test.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/222794216","html_url":"https://github.com/apache/spark/pull/13414#issuecomment-222794216","issue_url":"https://api.github.com/repos/apache/spark/issues/13414","id":222794216,"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":"2016-05-31T19:27:53Z","updated_at":"2016-05-31T19:27:53Z","body":"**[Test build #59663 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59663/consoleFull)** for PR 13414 at commit [`c2a29b3`](https://github.com/apache/spark/commit/c2a29b3fb8d5f8f0ceb12c0e62ac1d71cd3d1dd0).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds the following public classes _(experimental)_:\n  * `case class CreateTempViewUsing(`"}}
{"actor":{"display_login":"SparkQA"}}