{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12385","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12385/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12385/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12385/events","html_url":"https://github.com/apache/spark/pull/12385","id":148264004,"number":12385,"title":"[SPARK-14603] [SQL] Verification of Metadata Operations by Session Catalog","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":22,"created_at":"2016-04-14T06:31:14Z","updated_at":"2016-05-10T18:29:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12385","html_url":"https://github.com/apache/spark/pull/12385","diff_url":"https://github.com/apache/spark/pull/12385.diff","patch_url":"https://github.com/apache/spark/pull/12385.patch"},"body":"#### What changes were proposed in this pull request?\r\nSince we cannot really trust if the underlying external catalog can throw exceptions when there is an invalid metadata operation, let's do it in SessionCatalog.\r\n\r\n- [X] The first step is to unify the error messages issued in Hive-specific Session Catalog and general Session Catalog. \r\n- [X] The second step is to verify the inputs of metadata operations for partitioning-related operations. This is moved to a separate PR: https://github.com/apache/spark/pull/12801\r\n- [X] The third step is to add database existence verification in `SessionCatalog`\r\n- [X] The fourth step is to add table existence verification in `SessionCatalog`\r\n- [X] The fifth step is to add function existence verification in `SessionCatalog`\r\n\r\n#### How was this patch tested?\r\nAdd test cases and verify the error messages we issued"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/218247748","html_url":"https://github.com/apache/spark/pull/12385#issuecomment-218247748","issue_url":"https://api.github.com/repos/apache/spark/issues/12385","id":218247748,"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},"created_at":"2016-05-10T18:29:13Z","updated_at":"2016-05-10T18:29:13Z","body":"Thank you, will do the follow-up PR. "}}