{"action":"created","comment":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/23270095","id":23270095,"diff_hunk":"@@ -1593,21 +1593,38 @@ private static void updateIndexUsageAnnotation(Index index, Statement stmt) {\n         // LIMIT EXECUTE DELETE statements are parented by tables,\n         // not stored procedures.\n         CatalogType parent = stmt.getParent();\n-        if (!(parent instanceof Procedure))\n-                return;\n \n+        if (!(parent instanceof Procedure)) {\n+            IndexAnnotation ia = (IndexAnnotation) index.getAnnotation();\n+            if (ia == null) {\n+                ia = new IndexAnnotation();\n+                index.setAnnotation(ia);\n+            }\n+            ia.statementsThatUseThis.add(stmt);\n+\n+            return ;\n+        }\n+\n+        assert(parent instanceof Procedure);\n         Procedure proc = (Procedure) parent;\n+\n         // skip CRUD generated procs\n         if (proc.getDefaultproc()) {\n             return;\n         }\n \n+        StatementAnnotation sa = (StatementAnnotation) stmt.getAnnotation();","path":"src/frontend/org/voltdb/utils/CatalogUtil.java","position":82,"original_position":82,"commit_id":"d0cbaa9b40476770d73480412ec6966af5c77be9","original_commit_id":"d0cbaa9b40476770d73480412ec6966af5c77be9","user":{"login":"wolffcm","id":7902964,"avatar_url":"https://avatars.githubusercontent.com/u/7902964?v=3","gravatar_id":"","url":"https://api.github.com/users/wolffcm","html_url":"https://github.com/wolffcm","followers_url":"https://api.github.com/users/wolffcm/followers","following_url":"https://api.github.com/users/wolffcm/following{/other_user}","gists_url":"https://api.github.com/users/wolffcm/gists{/gist_id}","starred_url":"https://api.github.com/users/wolffcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolffcm/subscriptions","organizations_url":"https://api.github.com/users/wolffcm/orgs","repos_url":"https://api.github.com/users/wolffcm/repos","events_url":"https://api.github.com/users/wolffcm/events{/privacy}","received_events_url":"https://api.github.com/users/wolffcm/received_events","type":"User","site_admin":false},"body":"Should we also annotate the statement for the LIMIT PARTITION ROWS DELETE statement as well?","created_at":"2015-01-21T00:38:03Z","updated_at":"2015-01-21T00:38:03Z","html_url":"https://github.com/VoltDB/voltdb/pull/1975#discussion_r23270095","pull_request_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975","_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/23270095"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/1975#discussion_r23270095"},"pull_request":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975"}}},"pull_request":{"url":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975","id":27710542,"html_url":"https://github.com/VoltDB/voltdb/pull/1975","diff_url":"https://github.com/VoltDB/voltdb/pull/1975.diff","patch_url":"https://github.com/VoltDB/voltdb/pull/1975.patch","issue_url":"https://api.github.com/repos/VoltDB/voltdb/issues/1975","number":1975,"state":"open","locked":false,"title":"Display Index usage information for limit partition row delete statement","user":{"login":"jxchinaren","id":1305380,"avatar_url":"https://avatars.githubusercontent.com/u/1305380?v=3","gravatar_id":"","url":"https://api.github.com/users/jxchinaren","html_url":"https://github.com/jxchinaren","followers_url":"https://api.github.com/users/jxchinaren/followers","following_url":"https://api.github.com/users/jxchinaren/following{/other_user}","gists_url":"https://api.github.com/users/jxchinaren/gists{/gist_id}","starred_url":"https://api.github.com/users/jxchinaren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxchinaren/subscriptions","organizations_url":"https://api.github.com/users/jxchinaren/orgs","repos_url":"https://api.github.com/users/jxchinaren/repos","events_url":"https://api.github.com/users/jxchinaren/events{/privacy}","received_events_url":"https://api.github.com/users/jxchinaren/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-20T20:44:52Z","updated_at":"2015-01-21T00:38:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7a66c7466c8f07cdc1ac6ddbd5cfdb55006e458","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975/commits","review_comments_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975/comments","review_comment_url":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/{number}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/issues/1975/comments","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/d0cbaa9b40476770d73480412ec6966af5c77be9","head":{"label":"VoltDB:ENG-7346-limit-patition-catalog-report","ref":"ENG-7346-limit-patition-catalog-report","sha":"d0cbaa9b40476770d73480412ec6966af5c77be9","user":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"name":"voltdb","full_name":"VoltDB/voltdb","owner":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","created_at":"2011-09-23T18:46:12Z","updated_at":"2015-01-20T21:28:36Z","pushed_at":"2015-01-20T22:13:01Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":580991,"stargazers_count":427,"watchers_count":427,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":22,"forks":125,"open_issues":22,"watchers":427,"default_branch":"master"}},"base":{"label":"VoltDB:CORE-team","ref":"CORE-team","sha":"17762c0c3b70dd7b0ca7a425714bcc6daae6b15a","user":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"repo":{"id":2445970,"name":"voltdb","full_name":"VoltDB/voltdb","owner":{"login":"VoltDB","id":703910,"avatar_url":"https://avatars.githubusercontent.com/u/703910?v=3","gravatar_id":"","url":"https://api.github.com/users/VoltDB","html_url":"https://github.com/VoltDB","followers_url":"https://api.github.com/users/VoltDB/followers","following_url":"https://api.github.com/users/VoltDB/following{/other_user}","gists_url":"https://api.github.com/users/VoltDB/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltDB/subscriptions","organizations_url":"https://api.github.com/users/VoltDB/orgs","repos_url":"https://api.github.com/users/VoltDB/repos","events_url":"https://api.github.com/users/VoltDB/events{/privacy}","received_events_url":"https://api.github.com/users/VoltDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VoltDB/voltdb","description":"VoltDB","fork":false,"url":"https://api.github.com/repos/VoltDB/voltdb","forks_url":"https://api.github.com/repos/VoltDB/voltdb/forks","keys_url":"https://api.github.com/repos/VoltDB/voltdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoltDB/voltdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoltDB/voltdb/teams","hooks_url":"https://api.github.com/repos/VoltDB/voltdb/hooks","issue_events_url":"https://api.github.com/repos/VoltDB/voltdb/issues/events{/number}","events_url":"https://api.github.com/repos/VoltDB/voltdb/events","assignees_url":"https://api.github.com/repos/VoltDB/voltdb/assignees{/user}","branches_url":"https://api.github.com/repos/VoltDB/voltdb/branches{/branch}","tags_url":"https://api.github.com/repos/VoltDB/voltdb/tags","blobs_url":"https://api.github.com/repos/VoltDB/voltdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoltDB/voltdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoltDB/voltdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoltDB/voltdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoltDB/voltdb/statuses/{sha}","languages_url":"https://api.github.com/repos/VoltDB/voltdb/languages","stargazers_url":"https://api.github.com/repos/VoltDB/voltdb/stargazers","contributors_url":"https://api.github.com/repos/VoltDB/voltdb/contributors","subscribers_url":"https://api.github.com/repos/VoltDB/voltdb/subscribers","subscription_url":"https://api.github.com/repos/VoltDB/voltdb/subscription","commits_url":"https://api.github.com/repos/VoltDB/voltdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoltDB/voltdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoltDB/voltdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoltDB/voltdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/VoltDB/voltdb/contents/{+path}","compare_url":"https://api.github.com/repos/VoltDB/voltdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoltDB/voltdb/merges","archive_url":"https://api.github.com/repos/VoltDB/voltdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoltDB/voltdb/downloads","issues_url":"https://api.github.com/repos/VoltDB/voltdb/issues{/number}","pulls_url":"https://api.github.com/repos/VoltDB/voltdb/pulls{/number}","milestones_url":"https://api.github.com/repos/VoltDB/voltdb/milestones{/number}","notifications_url":"https://api.github.com/repos/VoltDB/voltdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoltDB/voltdb/labels{/name}","releases_url":"https://api.github.com/repos/VoltDB/voltdb/releases{/id}","created_at":"2011-09-23T18:46:12Z","updated_at":"2015-01-20T21:28:36Z","pushed_at":"2015-01-20T22:13:01Z","git_url":"git://github.com/VoltDB/voltdb.git","ssh_url":"git@github.com:VoltDB/voltdb.git","clone_url":"https://github.com/VoltDB/voltdb.git","svn_url":"https://github.com/VoltDB/voltdb","homepage":"http://community.voltdb.com/","size":580991,"stargazers_count":427,"watchers_count":427,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":22,"forks":125,"open_issues":22,"watchers":427,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975"},"html":{"href":"https://github.com/VoltDB/voltdb/pull/1975"},"issue":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/1975"},"comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/issues/1975/comments"},"review_comments":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975/comments"},"review_comment":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/VoltDB/voltdb/pulls/1975/commits"},"statuses":{"href":"https://api.github.com/repos/VoltDB/voltdb/statuses/d0cbaa9b40476770d73480412ec6966af5c77be9"}}}}