{"action":"created","comment":{"url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/comments/185698750","pull_request_review_id":117139127,"id":185698750,"diff_hunk":"@@ -236,48 +236,56 @@ case class DropIndexCommand(\n           if format.isInstanceOf[OapFileFormat] || format.isInstanceOf[ParquetFileFormat] =>\n         logInfo(s\"Dropping index $indexName\")\n         val partitions = OapUtils.getPartitions(fileCatalog, partitionSpec)\n-        partitions.filter(_.files.nonEmpty).foreach(p => {\n+        val targetDirs = partitions.filter(_.files.nonEmpty)\n+        if(targetDirs.isEmpty) {\n+          throw new AnalysisException(s\"\"\"No data and Index in $partitions\"\"\")","path":"src/main/scala/org/apache/spark/sql/execution/datasources/oap/index/indexPlans.scala","position":16,"original_position":16,"commit_id":"55bcfcad92abdd6840b384e853a2a3e08f092d6e","original_commit_id":"55bcfcad92abdd6840b384e853a2a3e08f092d6e","user":{"login":"adrian-wang","id":3078910,"avatar_url":"https://avatars0.githubusercontent.com/u/3078910?v=4","gravatar_id":"","url":"https://api.github.com/users/adrian-wang","html_url":"https://github.com/adrian-wang","followers_url":"https://api.github.com/users/adrian-wang/followers","following_url":"https://api.github.com/users/adrian-wang/following{/other_user}","gists_url":"https://api.github.com/users/adrian-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/adrian-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrian-wang/subscriptions","organizations_url":"https://api.github.com/users/adrian-wang/orgs","repos_url":"https://api.github.com/users/adrian-wang/repos","events_url":"https://api.github.com/users/adrian-wang/events{/privacy}","received_events_url":"https://api.github.com/users/adrian-wang/received_events","type":"User","site_admin":false},"body":"I prefer log it and return `Nil`. This is by no means an `AnalysisException`.","created_at":"2018-05-03T05:19:01Z","updated_at":"2018-05-03T05:29:10Z","html_url":"https://github.com/Intel-bigdata/OAP/pull/728#discussion_r185698750","pull_request_url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/comments/185698750"},"html":{"href":"https://github.com/Intel-bigdata/OAP/pull/728#discussion_r185698750"},"pull_request":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728"}},"in_reply_to_id":184841135},"pull_request":{"url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728","id":184761744,"html_url":"https://github.com/Intel-bigdata/OAP/pull/728","diff_url":"https://github.com/Intel-bigdata/OAP/pull/728.diff","patch_url":"https://github.com/Intel-bigdata/OAP/pull/728.patch","issue_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/728","number":728,"state":"open","locked":false,"title":"#644 optimize drop index strategy","user":{"login":"LuciferYang","id":1475305,"avatar_url":"https://avatars1.githubusercontent.com/u/1475305?v=4","gravatar_id":"","url":"https://api.github.com/users/LuciferYang","html_url":"https://github.com/LuciferYang","followers_url":"https://api.github.com/users/LuciferYang/followers","following_url":"https://api.github.com/users/LuciferYang/following{/other_user}","gists_url":"https://api.github.com/users/LuciferYang/gists{/gist_id}","starred_url":"https://api.github.com/users/LuciferYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuciferYang/subscriptions","organizations_url":"https://api.github.com/users/LuciferYang/orgs","repos_url":"https://api.github.com/users/LuciferYang/repos","events_url":"https://api.github.com/users/LuciferYang/events{/privacy}","received_events_url":"https://api.github.com/users/LuciferYang/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nTry to slove #644, If we have a `table` with data partitions b=1, b=2, b=3, then create `index1` at partition b=1 and b =2, if we run  `drop oindex index1 on  table`, before this pr will tell user Index index1 does not exist on CatalogTable, and use this pr will drop `index1` at partition b=1 and b =2, ignore partition b=3，I think this strategy more friendly.\r\n\r\n## How was this patch tested?\r\n\r\nmvn test pass\r\n","created_at":"2018-04-28T03:38:25Z","updated_at":"2018-05-03T05:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5096f02b85e97cfa13fdb695ac61d05673aa277","assignee":{"login":"LuciferYang","id":1475305,"avatar_url":"https://avatars1.githubusercontent.com/u/1475305?v=4","gravatar_id":"","url":"https://api.github.com/users/LuciferYang","html_url":"https://github.com/LuciferYang","followers_url":"https://api.github.com/users/LuciferYang/followers","following_url":"https://api.github.com/users/LuciferYang/following{/other_user}","gists_url":"https://api.github.com/users/LuciferYang/gists{/gist_id}","starred_url":"https://api.github.com/users/LuciferYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuciferYang/subscriptions","organizations_url":"https://api.github.com/users/LuciferYang/orgs","repos_url":"https://api.github.com/users/LuciferYang/repos","events_url":"https://api.github.com/users/LuciferYang/events{/privacy}","received_events_url":"https://api.github.com/users/LuciferYang/received_events","type":"User","site_admin":false},"assignees":[{"login":"LuciferYang","id":1475305,"avatar_url":"https://avatars1.githubusercontent.com/u/1475305?v=4","gravatar_id":"","url":"https://api.github.com/users/LuciferYang","html_url":"https://github.com/LuciferYang","followers_url":"https://api.github.com/users/LuciferYang/followers","following_url":"https://api.github.com/users/LuciferYang/following{/other_user}","gists_url":"https://api.github.com/users/LuciferYang/gists{/gist_id}","starred_url":"https://api.github.com/users/LuciferYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuciferYang/subscriptions","organizations_url":"https://api.github.com/users/LuciferYang/orgs","repos_url":"https://api.github.com/users/LuciferYang/repos","events_url":"https://api.github.com/users/LuciferYang/events{/privacy}","received_events_url":"https://api.github.com/users/LuciferYang/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728/commits","review_comments_url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728/comments","review_comment_url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/728/comments","statuses_url":"https://api.github.com/repos/Intel-bigdata/OAP/statuses/55bcfcad92abdd6840b384e853a2a3e08f092d6e","head":{"label":"LuciferYang:oap-644","ref":"oap-644","sha":"55bcfcad92abdd6840b384e853a2a3e08f092d6e","user":{"login":"LuciferYang","id":1475305,"avatar_url":"https://avatars1.githubusercontent.com/u/1475305?v=4","gravatar_id":"","url":"https://api.github.com/users/LuciferYang","html_url":"https://github.com/LuciferYang","followers_url":"https://api.github.com/users/LuciferYang/followers","following_url":"https://api.github.com/users/LuciferYang/following{/other_user}","gists_url":"https://api.github.com/users/LuciferYang/gists{/gist_id}","starred_url":"https://api.github.com/users/LuciferYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuciferYang/subscriptions","organizations_url":"https://api.github.com/users/LuciferYang/orgs","repos_url":"https://api.github.com/users/LuciferYang/repos","events_url":"https://api.github.com/users/LuciferYang/events{/privacy}","received_events_url":"https://api.github.com/users/LuciferYang/received_events","type":"User","site_admin":false},"repo":{"id":96757794,"name":"OAP","full_name":"LuciferYang/OAP","owner":{"login":"LuciferYang","id":1475305,"avatar_url":"https://avatars1.githubusercontent.com/u/1475305?v=4","gravatar_id":"","url":"https://api.github.com/users/LuciferYang","html_url":"https://github.com/LuciferYang","followers_url":"https://api.github.com/users/LuciferYang/followers","following_url":"https://api.github.com/users/LuciferYang/following{/other_user}","gists_url":"https://api.github.com/users/LuciferYang/gists{/gist_id}","starred_url":"https://api.github.com/users/LuciferYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuciferYang/subscriptions","organizations_url":"https://api.github.com/users/LuciferYang/orgs","repos_url":"https://api.github.com/users/LuciferYang/repos","events_url":"https://api.github.com/users/LuciferYang/events{/privacy}","received_events_url":"https://api.github.com/users/LuciferYang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LuciferYang/OAP","description":"Optimized Analytics Package for Spark Platform","fork":true,"url":"https://api.github.com/repos/LuciferYang/OAP","forks_url":"https://api.github.com/repos/LuciferYang/OAP/forks","keys_url":"https://api.github.com/repos/LuciferYang/OAP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuciferYang/OAP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuciferYang/OAP/teams","hooks_url":"https://api.github.com/repos/LuciferYang/OAP/hooks","issue_events_url":"https://api.github.com/repos/LuciferYang/OAP/issues/events{/number}","events_url":"https://api.github.com/repos/LuciferYang/OAP/events","assignees_url":"https://api.github.com/repos/LuciferYang/OAP/assignees{/user}","branches_url":"https://api.github.com/repos/LuciferYang/OAP/branches{/branch}","tags_url":"https://api.github.com/repos/LuciferYang/OAP/tags","blobs_url":"https://api.github.com/repos/LuciferYang/OAP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuciferYang/OAP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuciferYang/OAP/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuciferYang/OAP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuciferYang/OAP/statuses/{sha}","languages_url":"https://api.github.com/repos/LuciferYang/OAP/languages","stargazers_url":"https://api.github.com/repos/LuciferYang/OAP/stargazers","contributors_url":"https://api.github.com/repos/LuciferYang/OAP/contributors","subscribers_url":"https://api.github.com/repos/LuciferYang/OAP/subscribers","subscription_url":"https://api.github.com/repos/LuciferYang/OAP/subscription","commits_url":"https://api.github.com/repos/LuciferYang/OAP/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuciferYang/OAP/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuciferYang/OAP/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuciferYang/OAP/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuciferYang/OAP/contents/{+path}","compare_url":"https://api.github.com/repos/LuciferYang/OAP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuciferYang/OAP/merges","archive_url":"https://api.github.com/repos/LuciferYang/OAP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuciferYang/OAP/downloads","issues_url":"https://api.github.com/repos/LuciferYang/OAP/issues{/number}","pulls_url":"https://api.github.com/repos/LuciferYang/OAP/pulls{/number}","milestones_url":"https://api.github.com/repos/LuciferYang/OAP/milestones{/number}","notifications_url":"https://api.github.com/repos/LuciferYang/OAP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuciferYang/OAP/labels{/name}","releases_url":"https://api.github.com/repos/LuciferYang/OAP/releases{/id}","deployments_url":"https://api.github.com/repos/LuciferYang/OAP/deployments","created_at":"2017-07-10T09:05:25Z","updated_at":"2017-07-10T09:05:29Z","pushed_at":"2018-04-28T05:36:32Z","git_url":"git://github.com/LuciferYang/OAP.git","ssh_url":"git@github.com:LuciferYang/OAP.git","clone_url":"https://github.com/LuciferYang/OAP.git","svn_url":"https://github.com/LuciferYang/OAP","homepage":"","size":136812,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Intel-bigdata:master","ref":"master","sha":"697fb7cf5e6897955b512eafe7cdbaed78568cc5","user":{"login":"Intel-bigdata","id":8433081,"avatar_url":"https://avatars3.githubusercontent.com/u/8433081?v=4","gravatar_id":"","url":"https://api.github.com/users/Intel-bigdata","html_url":"https://github.com/Intel-bigdata","followers_url":"https://api.github.com/users/Intel-bigdata/followers","following_url":"https://api.github.com/users/Intel-bigdata/following{/other_user}","gists_url":"https://api.github.com/users/Intel-bigdata/gists{/gist_id}","starred_url":"https://api.github.com/users/Intel-bigdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Intel-bigdata/subscriptions","organizations_url":"https://api.github.com/users/Intel-bigdata/orgs","repos_url":"https://api.github.com/users/Intel-bigdata/repos","events_url":"https://api.github.com/users/Intel-bigdata/events{/privacy}","received_events_url":"https://api.github.com/users/Intel-bigdata/received_events","type":"Organization","site_admin":false},"repo":{"id":54008218,"name":"OAP","full_name":"Intel-bigdata/OAP","owner":{"login":"Intel-bigdata","id":8433081,"avatar_url":"https://avatars3.githubusercontent.com/u/8433081?v=4","gravatar_id":"","url":"https://api.github.com/users/Intel-bigdata","html_url":"https://github.com/Intel-bigdata","followers_url":"https://api.github.com/users/Intel-bigdata/followers","following_url":"https://api.github.com/users/Intel-bigdata/following{/other_user}","gists_url":"https://api.github.com/users/Intel-bigdata/gists{/gist_id}","starred_url":"https://api.github.com/users/Intel-bigdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Intel-bigdata/subscriptions","organizations_url":"https://api.github.com/users/Intel-bigdata/orgs","repos_url":"https://api.github.com/users/Intel-bigdata/repos","events_url":"https://api.github.com/users/Intel-bigdata/events{/privacy}","received_events_url":"https://api.github.com/users/Intel-bigdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Intel-bigdata/OAP","description":"Optimized Analytics Package for Spark Platform","fork":false,"url":"https://api.github.com/repos/Intel-bigdata/OAP","forks_url":"https://api.github.com/repos/Intel-bigdata/OAP/forks","keys_url":"https://api.github.com/repos/Intel-bigdata/OAP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Intel-bigdata/OAP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Intel-bigdata/OAP/teams","hooks_url":"https://api.github.com/repos/Intel-bigdata/OAP/hooks","issue_events_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/events{/number}","events_url":"https://api.github.com/repos/Intel-bigdata/OAP/events","assignees_url":"https://api.github.com/repos/Intel-bigdata/OAP/assignees{/user}","branches_url":"https://api.github.com/repos/Intel-bigdata/OAP/branches{/branch}","tags_url":"https://api.github.com/repos/Intel-bigdata/OAP/tags","blobs_url":"https://api.github.com/repos/Intel-bigdata/OAP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Intel-bigdata/OAP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Intel-bigdata/OAP/git/refs{/sha}","trees_url":"https://api.github.com/repos/Intel-bigdata/OAP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Intel-bigdata/OAP/statuses/{sha}","languages_url":"https://api.github.com/repos/Intel-bigdata/OAP/languages","stargazers_url":"https://api.github.com/repos/Intel-bigdata/OAP/stargazers","contributors_url":"https://api.github.com/repos/Intel-bigdata/OAP/contributors","subscribers_url":"https://api.github.com/repos/Intel-bigdata/OAP/subscribers","subscription_url":"https://api.github.com/repos/Intel-bigdata/OAP/subscription","commits_url":"https://api.github.com/repos/Intel-bigdata/OAP/commits{/sha}","git_commits_url":"https://api.github.com/repos/Intel-bigdata/OAP/git/commits{/sha}","comments_url":"https://api.github.com/repos/Intel-bigdata/OAP/comments{/number}","issue_comment_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues/comments{/number}","contents_url":"https://api.github.com/repos/Intel-bigdata/OAP/contents/{+path}","compare_url":"https://api.github.com/repos/Intel-bigdata/OAP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Intel-bigdata/OAP/merges","archive_url":"https://api.github.com/repos/Intel-bigdata/OAP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Intel-bigdata/OAP/downloads","issues_url":"https://api.github.com/repos/Intel-bigdata/OAP/issues{/number}","pulls_url":"https://api.github.com/repos/Intel-bigdata/OAP/pulls{/number}","milestones_url":"https://api.github.com/repos/Intel-bigdata/OAP/milestones{/number}","notifications_url":"https://api.github.com/repos/Intel-bigdata/OAP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Intel-bigdata/OAP/labels{/name}","releases_url":"https://api.github.com/repos/Intel-bigdata/OAP/releases{/id}","deployments_url":"https://api.github.com/repos/Intel-bigdata/OAP/deployments","created_at":"2016-03-16T06:56:47Z","updated_at":"2018-05-03T04:20:21Z","pushed_at":"2018-05-03T04:20:18Z","git_url":"git://github.com/Intel-bigdata/OAP.git","ssh_url":"git@github.com:Intel-bigdata/OAP.git","clone_url":"https://github.com/Intel-bigdata/OAP.git","svn_url":"https://github.com/Intel-bigdata/OAP","homepage":"","size":136829,"stargazers_count":112,"watchers_count":112,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"archived":false,"open_issues_count":77,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":35,"open_issues":77,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728"},"html":{"href":"https://github.com/Intel-bigdata/OAP/pull/728"},"issue":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/issues/728"},"comments":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/issues/728/comments"},"review_comments":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728/comments"},"review_comment":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/pulls/728/commits"},"statuses":{"href":"https://api.github.com/repos/Intel-bigdata/OAP/statuses/55bcfcad92abdd6840b384e853a2a3e08f092d6e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"adrian-wang"}}