{"action":"created","comment":{"url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/comments/46497666","id":46497666,"diff_hunk":"@@ -241,6 +245,73 @@ private void executeQuery(String query) throws IOException, SQLException {\n     }\n   }\n \n+  private void executeLimitZeroQuery(String query) throws IOException, SQLException {\n+\tBufferedWriter writer = new BufferedWriter(new FileWriter(new File(outputFilename),true));\n+    final boolean cancelQuery = rand.nextInt(100) < TestDriver.OPTIONS.cancelPercent;\n+    CancelQuery c = null;\n+    ResultSet resultSetA = null;\n+    try {\n+      Statement statement = connection.createStatement();\n+      resultSetA = statement.executeQuery(query);      \n+      if (cancelQuery) {\n+        c = new CancelQuery(statement);\n+        c.start();\n+      }  \n+    } finally {\n+      if (cancelQuery) {\n+        try {\n+          c.join();\n+          if (testStatus == TestStatus.CANCELED) {\n+            if (resultSetA != null) {\n+              resultSetA.close();\n+            }\n+            if (writer != null) {\n+              writer.close();\n+            }\n+            return;\n+          }\n+        } catch (InterruptedException e) {\n+          resultSetA.close();\n+          writer.close();\n+          return;\n+        }\n+      }\n+    }\n+    List columnLabelsA = new ArrayList<String>();","path":"framework/src/main/java/org/apache/drill/test/framework/DrillTestJdbc.java","position":64,"original_position":64,"commit_id":"488d9980cf0032e8fbfdc74a376ae7df3da63562","original_commit_id":"488d9980cf0032e8fbfdc74a376ae7df3da63562","user":{"login":"sudheeshkatkam","id":3272600,"avatar_url":"https://avatars.githubusercontent.com/u/3272600?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheeshkatkam","html_url":"https://github.com/sudheeshkatkam","followers_url":"https://api.github.com/users/sudheeshkatkam/followers","following_url":"https://api.github.com/users/sudheeshkatkam/following{/other_user}","gists_url":"https://api.github.com/users/sudheeshkatkam/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheeshkatkam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheeshkatkam/subscriptions","organizations_url":"https://api.github.com/users/sudheeshkatkam/orgs","repos_url":"https://api.github.com/users/sudheeshkatkam/repos","events_url":"https://api.github.com/users/sudheeshkatkam/events{/privacy}","received_events_url":"https://api.github.com/users/sudheeshkatkam/received_events","type":"User","site_admin":false},"body":"You can use [variable shadowing](http://www.xyzws.com/javafaq/what-is-variable-hiding-and-shadowing/15), and name these local variables as is (resultSet, columnLabels, types, ...). To access the instance level variables use *this* (this.resultSet, this.columnLabels, ...).","created_at":"2015-12-03T00:21:35Z","updated_at":"2015-12-03T00:21:35Z","html_url":"https://github.com/mapr/drill-test-framework/pull/62#discussion_r46497666","pull_request_url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/comments/46497666"},"html":{"href":"https://github.com/mapr/drill-test-framework/pull/62#discussion_r46497666"},"pull_request":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62","id":52472732,"html_url":"https://github.com/mapr/drill-test-framework/pull/62","diff_url":"https://github.com/mapr/drill-test-framework/pull/62.diff","patch_url":"https://github.com/mapr/drill-test-framework/pull/62.patch","issue_url":"https://api.github.com/repos/mapr/drill-test-framework/issues/62","number":62,"state":"open","locked":false,"title":"MD-575 support \"limit 0\" type of tests","user":{"login":"cchang738","id":4193676,"avatar_url":"https://avatars.githubusercontent.com/u/4193676?v=3","gravatar_id":"","url":"https://api.github.com/users/cchang738","html_url":"https://github.com/cchang738","followers_url":"https://api.github.com/users/cchang738/followers","following_url":"https://api.github.com/users/cchang738/following{/other_user}","gists_url":"https://api.github.com/users/cchang738/gists{/gist_id}","starred_url":"https://api.github.com/users/cchang738/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchang738/subscriptions","organizations_url":"https://api.github.com/users/cchang738/orgs","repos_url":"https://api.github.com/users/cchang738/repos","events_url":"https://api.github.com/users/cchang738/events{/privacy}","received_events_url":"https://api.github.com/users/cchang738/received_events","type":"User","site_admin":false},"body":"Please refer to MD-575 for feature and implementation summary. Pre-commit run at the following link.\r\n\r\nhttp://10.10.104.91:8080/job/Framework%20Regression/234/consoleFull\r\n\r\nPlease review. Thanks.","created_at":"2015-12-02T23:52:04Z","updated_at":"2015-12-03T00:21:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c335491fbcc70cc9210b031a424237afe5b0815d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62/commits","review_comments_url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62/comments","review_comment_url":"https://api.github.com/repos/mapr/drill-test-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapr/drill-test-framework/issues/62/comments","statuses_url":"https://api.github.com/repos/mapr/drill-test-framework/statuses/488d9980cf0032e8fbfdc74a376ae7df3da63562","head":{"label":"cchang738:MD-575","ref":"MD-575","sha":"488d9980cf0032e8fbfdc74a376ae7df3da63562","user":{"login":"cchang738","id":4193676,"avatar_url":"https://avatars.githubusercontent.com/u/4193676?v=3","gravatar_id":"","url":"https://api.github.com/users/cchang738","html_url":"https://github.com/cchang738","followers_url":"https://api.github.com/users/cchang738/followers","following_url":"https://api.github.com/users/cchang738/following{/other_user}","gists_url":"https://api.github.com/users/cchang738/gists{/gist_id}","starred_url":"https://api.github.com/users/cchang738/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchang738/subscriptions","organizations_url":"https://api.github.com/users/cchang738/orgs","repos_url":"https://api.github.com/users/cchang738/repos","events_url":"https://api.github.com/users/cchang738/events{/privacy}","received_events_url":"https://api.github.com/users/cchang738/received_events","type":"User","site_admin":false},"repo":{"id":42882105,"name":"drill-test-framework","full_name":"cchang738/drill-test-framework","owner":{"login":"cchang738","id":4193676,"avatar_url":"https://avatars.githubusercontent.com/u/4193676?v=3","gravatar_id":"","url":"https://api.github.com/users/cchang738","html_url":"https://github.com/cchang738","followers_url":"https://api.github.com/users/cchang738/followers","following_url":"https://api.github.com/users/cchang738/following{/other_user}","gists_url":"https://api.github.com/users/cchang738/gists{/gist_id}","starred_url":"https://api.github.com/users/cchang738/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchang738/subscriptions","organizations_url":"https://api.github.com/users/cchang738/orgs","repos_url":"https://api.github.com/users/cchang738/repos","events_url":"https://api.github.com/users/cchang738/events{/privacy}","received_events_url":"https://api.github.com/users/cchang738/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cchang738/drill-test-framework","description":"Test Framework for Apache Drill","fork":true,"url":"https://api.github.com/repos/cchang738/drill-test-framework","forks_url":"https://api.github.com/repos/cchang738/drill-test-framework/forks","keys_url":"https://api.github.com/repos/cchang738/drill-test-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cchang738/drill-test-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cchang738/drill-test-framework/teams","hooks_url":"https://api.github.com/repos/cchang738/drill-test-framework/hooks","issue_events_url":"https://api.github.com/repos/cchang738/drill-test-framework/issues/events{/number}","events_url":"https://api.github.com/repos/cchang738/drill-test-framework/events","assignees_url":"https://api.github.com/repos/cchang738/drill-test-framework/assignees{/user}","branches_url":"https://api.github.com/repos/cchang738/drill-test-framework/branches{/branch}","tags_url":"https://api.github.com/repos/cchang738/drill-test-framework/tags","blobs_url":"https://api.github.com/repos/cchang738/drill-test-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cchang738/drill-test-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cchang738/drill-test-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/cchang738/drill-test-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cchang738/drill-test-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/cchang738/drill-test-framework/languages","stargazers_url":"https://api.github.com/repos/cchang738/drill-test-framework/stargazers","contributors_url":"https://api.github.com/repos/cchang738/drill-test-framework/contributors","subscribers_url":"https://api.github.com/repos/cchang738/drill-test-framework/subscribers","subscription_url":"https://api.github.com/repos/cchang738/drill-test-framework/subscription","commits_url":"https://api.github.com/repos/cchang738/drill-test-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/cchang738/drill-test-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/cchang738/drill-test-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/cchang738/drill-test-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/cchang738/drill-test-framework/contents/{+path}","compare_url":"https://api.github.com/repos/cchang738/drill-test-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cchang738/drill-test-framework/merges","archive_url":"https://api.github.com/repos/cchang738/drill-test-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cchang738/drill-test-framework/downloads","issues_url":"https://api.github.com/repos/cchang738/drill-test-framework/issues{/number}","pulls_url":"https://api.github.com/repos/cchang738/drill-test-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/cchang738/drill-test-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/cchang738/drill-test-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cchang738/drill-test-framework/labels{/name}","releases_url":"https://api.github.com/repos/cchang738/drill-test-framework/releases{/id}","created_at":"2015-09-21T17:26:42Z","updated_at":"2015-09-21T17:28:15Z","pushed_at":"2015-12-02T21:47:20Z","git_url":"git://github.com/cchang738/drill-test-framework.git","ssh_url":"git@github.com:cchang738/drill-test-framework.git","clone_url":"https://github.com/cchang738/drill-test-framework.git","svn_url":"https://github.com/cchang738/drill-test-framework","homepage":"","size":928392,"stargazers_count":0,"watchers_count":0,"language":"Eiffel","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapr:master","ref":"master","sha":"a0beeeeb67a5f840827d74d37a2618e9ba230d4c","user":{"login":"mapr","id":1226517,"avatar_url":"https://avatars.githubusercontent.com/u/1226517?v=3","gravatar_id":"","url":"https://api.github.com/users/mapr","html_url":"https://github.com/mapr","followers_url":"https://api.github.com/users/mapr/followers","following_url":"https://api.github.com/users/mapr/following{/other_user}","gists_url":"https://api.github.com/users/mapr/gists{/gist_id}","starred_url":"https://api.github.com/users/mapr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapr/subscriptions","organizations_url":"https://api.github.com/users/mapr/orgs","repos_url":"https://api.github.com/users/mapr/repos","events_url":"https://api.github.com/users/mapr/events{/privacy}","received_events_url":"https://api.github.com/users/mapr/received_events","type":"Organization","site_admin":false},"repo":{"id":41067950,"name":"drill-test-framework","full_name":"mapr/drill-test-framework","owner":{"login":"mapr","id":1226517,"avatar_url":"https://avatars.githubusercontent.com/u/1226517?v=3","gravatar_id":"","url":"https://api.github.com/users/mapr","html_url":"https://github.com/mapr","followers_url":"https://api.github.com/users/mapr/followers","following_url":"https://api.github.com/users/mapr/following{/other_user}","gists_url":"https://api.github.com/users/mapr/gists{/gist_id}","starred_url":"https://api.github.com/users/mapr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapr/subscriptions","organizations_url":"https://api.github.com/users/mapr/orgs","repos_url":"https://api.github.com/users/mapr/repos","events_url":"https://api.github.com/users/mapr/events{/privacy}","received_events_url":"https://api.github.com/users/mapr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapr/drill-test-framework","description":"Test Framework for Apache Drill","fork":false,"url":"https://api.github.com/repos/mapr/drill-test-framework","forks_url":"https://api.github.com/repos/mapr/drill-test-framework/forks","keys_url":"https://api.github.com/repos/mapr/drill-test-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapr/drill-test-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapr/drill-test-framework/teams","hooks_url":"https://api.github.com/repos/mapr/drill-test-framework/hooks","issue_events_url":"https://api.github.com/repos/mapr/drill-test-framework/issues/events{/number}","events_url":"https://api.github.com/repos/mapr/drill-test-framework/events","assignees_url":"https://api.github.com/repos/mapr/drill-test-framework/assignees{/user}","branches_url":"https://api.github.com/repos/mapr/drill-test-framework/branches{/branch}","tags_url":"https://api.github.com/repos/mapr/drill-test-framework/tags","blobs_url":"https://api.github.com/repos/mapr/drill-test-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapr/drill-test-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapr/drill-test-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapr/drill-test-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapr/drill-test-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/mapr/drill-test-framework/languages","stargazers_url":"https://api.github.com/repos/mapr/drill-test-framework/stargazers","contributors_url":"https://api.github.com/repos/mapr/drill-test-framework/contributors","subscribers_url":"https://api.github.com/repos/mapr/drill-test-framework/subscribers","subscription_url":"https://api.github.com/repos/mapr/drill-test-framework/subscription","commits_url":"https://api.github.com/repos/mapr/drill-test-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapr/drill-test-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapr/drill-test-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapr/drill-test-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapr/drill-test-framework/contents/{+path}","compare_url":"https://api.github.com/repos/mapr/drill-test-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapr/drill-test-framework/merges","archive_url":"https://api.github.com/repos/mapr/drill-test-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapr/drill-test-framework/downloads","issues_url":"https://api.github.com/repos/mapr/drill-test-framework/issues{/number}","pulls_url":"https://api.github.com/repos/mapr/drill-test-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/mapr/drill-test-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/mapr/drill-test-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapr/drill-test-framework/labels{/name}","releases_url":"https://api.github.com/repos/mapr/drill-test-framework/releases{/id}","created_at":"2015-08-20T01:12:00Z","updated_at":"2015-09-17T21:24:40Z","pushed_at":"2015-12-02T23:52:04Z","git_url":"git://github.com/mapr/drill-test-framework.git","ssh_url":"git@github.com:mapr/drill-test-framework.git","clone_url":"https://github.com/mapr/drill-test-framework.git","svn_url":"https://github.com/mapr/drill-test-framework","homepage":"","size":930043,"stargazers_count":0,"watchers_count":0,"language":"Eiffel","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62"},"html":{"href":"https://github.com/mapr/drill-test-framework/pull/62"},"issue":{"href":"https://api.github.com/repos/mapr/drill-test-framework/issues/62"},"comments":{"href":"https://api.github.com/repos/mapr/drill-test-framework/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapr/drill-test-framework/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/mapr/drill-test-framework/statuses/488d9980cf0032e8fbfdc74a376ae7df3da63562"}}}}