{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13822","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13822/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13822/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13822/events","html_url":"https://github.com/apache/spark/pull/13822","id":161546375,"number":13822,"title":"[SPARK-16115][SQL] Change output schema to be partition for SHOW PARTITIONS command and …","user":{"login":"skambha","id":16563220,"avatar_url":"https://avatars.githubusercontent.com/u/16563220?v=3","gravatar_id":"","url":"https://api.github.com/users/skambha","html_url":"https://github.com/skambha","followers_url":"https://api.github.com/users/skambha/followers","following_url":"https://api.github.com/users/skambha/following{/other_user}","gists_url":"https://api.github.com/users/skambha/gists{/gist_id}","starred_url":"https://api.github.com/users/skambha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skambha/subscriptions","organizations_url":"https://api.github.com/users/skambha/orgs","repos_url":"https://api.github.com/users/skambha/repos","events_url":"https://api.github.com/users/skambha/events{/privacy}","received_events_url":"https://api.github.com/users/skambha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-21T21:41:04Z","updated_at":"2016-08-02T18:40:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13822","html_url":"https://github.com/apache/spark/pull/13822","diff_url":"https://github.com/apache/spark/pull/13822.diff","patch_url":"https://github.com/apache/spark/pull/13822.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nChanges include: \r\n-  For the SHOW PARTITIONS command, the column name in the output is changed from 'result' to 'partition' as it is more descriptive.  This is now similar to Hive.\r\n\r\n- Corner case: Improve the error message when calling show partitions on a non-existent table. \r\nAdd a check to see if table exists or not and add error message.\r\n\r\nWithout the fix: \r\n```\r\nscala> spark.sql(\"show partitions t1\");\r\norg.apache.spark.sql.AnalysisException: SHOW PARTITIONS is not allowed on a table that is not partitioned: default.t1;\r\n\r\n```\r\nWith the fix: \r\n```\r\nscala> spark.sql(\"SHOW PARTITIONS T1\").show;\r\norg.apache.spark.sql.AnalysisException:  Table does not exist;\r\n```\r\n\r\n## How was this patch tested?\r\n- Added unit tests to cover these two scenarios\r\n- Following unit tests were run successfully:  hive/test, sql/test, catalyst/test"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/237000966","html_url":"https://github.com/apache/spark/pull/13822#issuecomment-237000966","issue_url":"https://api.github.com/repos/apache/spark/issues/13822","id":237000966,"user":{"login":"skambha","id":16563220,"avatar_url":"https://avatars.githubusercontent.com/u/16563220?v=3","gravatar_id":"","url":"https://api.github.com/users/skambha","html_url":"https://github.com/skambha","followers_url":"https://api.github.com/users/skambha/followers","following_url":"https://api.github.com/users/skambha/following{/other_user}","gists_url":"https://api.github.com/users/skambha/gists{/gist_id}","starred_url":"https://api.github.com/users/skambha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skambha/subscriptions","organizations_url":"https://api.github.com/users/skambha/orgs","repos_url":"https://api.github.com/users/skambha/repos","events_url":"https://api.github.com/users/skambha/events{/privacy}","received_events_url":"https://api.github.com/users/skambha/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T18:40:34Z","updated_at":"2016-08-02T18:40:34Z","body":"gentle ping @andrewor14  \r\n\r\nI have rebased it to the master.   When you get a chance, can you please review.  Thanks. "}}
{"actor":{"display_login":"skambha"}}