{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13593","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13593/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13593/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13593/events","html_url":"https://github.com/apache/spark/pull/13593","id":159565559,"number":13593,"title":"[SPARK-15864] [SQL] Fix Inconsistent Behaviors when Uncaching Non-cached Tables","user":{"login":"gatorsmile","id":11567269,"avatar_url":"https://avatars.githubusercontent.com/u/11567269?v=3","gravatar_id":"","url":"https://api.github.com/users/gatorsmile","html_url":"https://github.com/gatorsmile","followers_url":"https://api.github.com/users/gatorsmile/followers","following_url":"https://api.github.com/users/gatorsmile/following{/other_user}","gists_url":"https://api.github.com/users/gatorsmile/gists{/gist_id}","starred_url":"https://api.github.com/users/gatorsmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatorsmile/subscriptions","organizations_url":"https://api.github.com/users/gatorsmile/orgs","repos_url":"https://api.github.com/users/gatorsmile/repos","events_url":"https://api.github.com/users/gatorsmile/events{/privacy}","received_events_url":"https://api.github.com/users/gatorsmile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-06-10T06:12:11Z","updated_at":"2016-06-14T09:00:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13593","html_url":"https://github.com/apache/spark/pull/13593","diff_url":"https://github.com/apache/spark/pull/13593.diff","patch_url":"https://github.com/apache/spark/pull/13593.patch"},"body":"#### What changes were proposed in this pull request?\r\nTo uncache a table, we have two different APIs:\r\n- _SQL interface_: `UNCACHE TABLE`\r\n- _DataSet API_: `sparkSession.catalog.uncacheTable`\r\n\r\nWhen the table is not cached,\r\n- _SQL interface_: `UNCACHE TABLE non-cachedTable` -> **no error message**\r\n- _Dataset API_: `sparkSession.catalog.uncacheTable(\"non-cachedTable\")` -> **report a strange error message:**\r\n```requirement failed: Table [a: int] is not cached```\r\n\r\nThis PR will improve both cases. Both will report the same new error message:\r\n```\r\nTable `tableName` is not cached\r\n```\r\n\r\n**Note:** Users might use the third way: `sparkSession.table(tableName).unpersist()`\r\nIn this case, we will not report any error message when we are trying to uncache an non-cached table.\r\n\r\n#### How was this patch tested?\r\nImproved the existing test case for verifying the cases when the table has not been cached.\r\nAlso added test cases for verifying the cases when the table does not exist"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/225821061","html_url":"https://github.com/apache/spark/pull/13593#issuecomment-225821061","issue_url":"https://api.github.com/repos/apache/spark/issues/13593","id":225821061,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","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":"2016-06-14T09:00:04Z","updated_at":"2016-06-14T09:00:04Z","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60474/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}