{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/presto/pulls/comments/46540961","id":46540961,"diff_hunk":"@@ -848,6 +881,111 @@ public void testExecute()\n     }\n \n     @Test\n+    public void testExecuteWithInsert()\n+            throws Exception\n+    {\n+        try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n+            try (Statement statement = connection.createStatement()) {\n+                assertFalse(statement.execute(\"INSERT INTO test_table VALUES (1)\"));\n+\n+                assertNull(statement.getResultSet());\n+                assertEquals(statement.getUpdateCount(), 1);\n+                assertEquals(statement.getLargeUpdateCount(), 1L);\n+            }\n+        }\n+    }\n+\n+    @Test\n+    public void testExecuteUpdateWithDDLStatement()\n+            throws Exception\n+    {\n+        try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n+            try (Statement statement = connection.createStatement()) {\n+                assertEquals(statement.executeUpdate(\"INSERT INTO test_table VALUES (1)\"), 1);\n+                assertNull(statement.getResultSet());\n+                assertEquals(statement.getUpdateCount(), 1);\n+                assertEquals(statement.getLargeUpdateCount(), 1L);\n+            }\n+        }\n+    }\n+\n+    @Test\n+    public void testExecuteUpdateWithDMLStatement()\n+            throws Exception\n+    {\n+        try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n+            try (Statement statement = connection.createStatement()) {\n+                assertEquals(statement.executeUpdate(\"CREATE TABLE test_table_2 (key BIGINT)\"), 0);\n+                assertNull(statement.getResultSet());\n+                assertEquals(statement.getUpdateCount(), 0);\n+                assertEquals(statement.getLargeUpdateCount(), 0L);\n+            }\n+        }\n+    }\n+\n+    @Test\n+    public void testExecuteUpdateWithQueryStatement()\n+            throws Exception\n+    {\n+        try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n+            try (Statement statement = connection.createStatement()) {\n+                try {\n+                    statement.executeUpdate(\"SELECT 123 x, 'foo' y, CAST(NULL AS bigint) z\");\n+                    fail(\"Expected SQL exception\");\n+                }\n+                catch (SQLException e) {\n+                    assertEquals(e.getMessage(), \"Not an update statement: SELECT 123 x, 'foo' y, CAST(NULL AS bigint) z\");\n+                }\n+            }\n+        }\n+    }\n+\n+    @Test\n+    public void testExecuteQueryWithDDLStatement()\n+            throws Exception\n+    {\n+        try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n+            try (Statement statement = connection.createStatement()) {\n+                try {\n+                    statement.executeQuery(\"INSERT INTO test_table VALUES (1)\");\n+                    fail(\"Expected SQL exception\");\n+                }\n+                catch (SQLException e) {\n+                    assertEquals(e.getMessage(), \"Not an query statement: INSERT INTO test_table VALUES (1)\");\n+                }\n+            }\n+        }\n+    }\n+\n+    @Test\n+    public void testExecuteUpdateCountCurrentResultCleared()","path":"presto-jdbc/src/test/java/com/facebook/presto/jdbc/TestDriver.java","position":197,"original_position":197,"commit_id":"17a152baabcfd1a15eee9c23e871e901b1f2df50","original_commit_id":"17a152baabcfd1a15eee9c23e871e901b1f2df50","user":{"login":"losipiuk","id":890111,"avatar_url":"https://avatars.githubusercontent.com/u/890111?v=3","gravatar_id":"","url":"https://api.github.com/users/losipiuk","html_url":"https://github.com/losipiuk","followers_url":"https://api.github.com/users/losipiuk/followers","following_url":"https://api.github.com/users/losipiuk/following{/other_user}","gists_url":"https://api.github.com/users/losipiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/losipiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losipiuk/subscriptions","organizations_url":"https://api.github.com/users/losipiuk/orgs","repos_url":"https://api.github.com/users/losipiuk/repos","events_url":"https://api.github.com/users/losipiuk/events{/privacy}","received_events_url":"https://api.github.com/users/losipiuk/received_events","type":"User","site_admin":false},"body":"done","created_at":"2015-12-03T11:33:24Z","updated_at":"2015-12-03T11:33:24Z","html_url":"https://github.com/facebook/presto/pull/3097#discussion_r46540961","pull_request_url":"https://api.github.com/repos/facebook/presto/pulls/3097","_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments/46540961"},"html":{"href":"https://github.com/facebook/presto/pull/3097#discussion_r46540961"},"pull_request":{"href":"https://api.github.com/repos/facebook/presto/pulls/3097"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/presto/pulls/3097","id":37683694,"html_url":"https://github.com/facebook/presto/pull/3097","diff_url":"https://github.com/facebook/presto/pull/3097.diff","patch_url":"https://github.com/facebook/presto/pull/3097.patch","issue_url":"https://api.github.com/repos/facebook/presto/issues/3097","number":3097,"state":"open","locked":false,"title":"JDBC executeUpdate support","user":{"login":"losipiuk","id":890111,"avatar_url":"https://avatars.githubusercontent.com/u/890111?v=3","gravatar_id":"","url":"https://api.github.com/users/losipiuk","html_url":"https://github.com/losipiuk","followers_url":"https://api.github.com/users/losipiuk/followers","following_url":"https://api.github.com/users/losipiuk/following{/other_user}","gists_url":"https://api.github.com/users/losipiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/losipiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losipiuk/subscriptions","organizations_url":"https://api.github.com/users/losipiuk/orgs","repos_url":"https://api.github.com/users/losipiuk/repos","events_url":"https://api.github.com/users/losipiuk/events{/privacy}","received_events_url":"https://api.github.com/users/losipiuk/received_events","type":"User","site_admin":false},"body":"Replacement for https://github.com/TeradataCenterForHadoop/presto-td/pull/2","created_at":"2015-06-15T11:56:05Z","updated_at":"2015-12-03T11:33:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"535042bc0fc6ed352617aa5303ea38a12fc1e535","assignee":{"login":"electrum","id":9230,"avatar_url":"https://avatars.githubusercontent.com/u/9230?v=3","gravatar_id":"","url":"https://api.github.com/users/electrum","html_url":"https://github.com/electrum","followers_url":"https://api.github.com/users/electrum/followers","following_url":"https://api.github.com/users/electrum/following{/other_user}","gists_url":"https://api.github.com/users/electrum/gists{/gist_id}","starred_url":"https://api.github.com/users/electrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrum/subscriptions","organizations_url":"https://api.github.com/users/electrum/orgs","repos_url":"https://api.github.com/users/electrum/repos","events_url":"https://api.github.com/users/electrum/events{/privacy}","received_events_url":"https://api.github.com/users/electrum/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/presto/pulls/3097/commits","review_comments_url":"https://api.github.com/repos/facebook/presto/pulls/3097/comments","review_comment_url":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/presto/issues/3097/comments","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/17a152baabcfd1a15eee9c23e871e901b1f2df50","head":{"label":"Teradata:jdbc-execute-update","ref":"jdbc-execute-update","sha":"17a152baabcfd1a15eee9c23e871e901b1f2df50","user":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"repo":{"id":36903368,"name":"presto","full_name":"Teradata/presto","owner":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Teradata/presto","description":"Teradata's Certified Version of Presto -- A Distributed SQL Query Engine for Big Data","fork":true,"url":"https://api.github.com/repos/Teradata/presto","forks_url":"https://api.github.com/repos/Teradata/presto/forks","keys_url":"https://api.github.com/repos/Teradata/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Teradata/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Teradata/presto/teams","hooks_url":"https://api.github.com/repos/Teradata/presto/hooks","issue_events_url":"https://api.github.com/repos/Teradata/presto/issues/events{/number}","events_url":"https://api.github.com/repos/Teradata/presto/events","assignees_url":"https://api.github.com/repos/Teradata/presto/assignees{/user}","branches_url":"https://api.github.com/repos/Teradata/presto/branches{/branch}","tags_url":"https://api.github.com/repos/Teradata/presto/tags","blobs_url":"https://api.github.com/repos/Teradata/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Teradata/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Teradata/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Teradata/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Teradata/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/Teradata/presto/languages","stargazers_url":"https://api.github.com/repos/Teradata/presto/stargazers","contributors_url":"https://api.github.com/repos/Teradata/presto/contributors","subscribers_url":"https://api.github.com/repos/Teradata/presto/subscribers","subscription_url":"https://api.github.com/repos/Teradata/presto/subscription","commits_url":"https://api.github.com/repos/Teradata/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Teradata/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Teradata/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Teradata/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Teradata/presto/contents/{+path}","compare_url":"https://api.github.com/repos/Teradata/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Teradata/presto/merges","archive_url":"https://api.github.com/repos/Teradata/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Teradata/presto/downloads","issues_url":"https://api.github.com/repos/Teradata/presto/issues{/number}","pulls_url":"https://api.github.com/repos/Teradata/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/Teradata/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/Teradata/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Teradata/presto/labels{/name}","releases_url":"https://api.github.com/repos/Teradata/presto/releases{/id}","created_at":"2015-06-05T00:38:37Z","updated_at":"2015-11-27T21:05:56Z","pushed_at":"2015-12-03T08:13:30Z","git_url":"git://github.com/Teradata/presto.git","ssh_url":"git@github.com:Teradata/presto.git","clone_url":"https://github.com/Teradata/presto.git","svn_url":"https://github.com/Teradata/presto","homepage":"http://www.teradata.com/presto","size":85111,"stargazers_count":27,"watchers_count":27,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":27,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"02029adf66fd6482e43fe98c2c12935db34ef49f","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"facebook/presto","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":false,"url":"https://api.github.com/repos/facebook/presto","forks_url":"https://api.github.com/repos/facebook/presto/forks","keys_url":"https://api.github.com/repos/facebook/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/presto/teams","hooks_url":"https://api.github.com/repos/facebook/presto/hooks","issue_events_url":"https://api.github.com/repos/facebook/presto/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/presto/events","assignees_url":"https://api.github.com/repos/facebook/presto/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/presto/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/presto/tags","blobs_url":"https://api.github.com/repos/facebook/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/presto/languages","stargazers_url":"https://api.github.com/repos/facebook/presto/stargazers","contributors_url":"https://api.github.com/repos/facebook/presto/contributors","subscribers_url":"https://api.github.com/repos/facebook/presto/subscribers","subscription_url":"https://api.github.com/repos/facebook/presto/subscription","commits_url":"https://api.github.com/repos/facebook/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/presto/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/presto/merges","archive_url":"https://api.github.com/repos/facebook/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/presto/downloads","issues_url":"https://api.github.com/repos/facebook/presto/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/presto/labels{/name}","releases_url":"https://api.github.com/repos/facebook/presto/releases{/id}","created_at":"2012-08-09T01:03:37Z","updated_at":"2015-12-03T08:33:38Z","pushed_at":"2015-12-03T07:04:08Z","git_url":"git://github.com/facebook/presto.git","ssh_url":"git@github.com:facebook/presto.git","clone_url":"https://github.com/facebook/presto.git","svn_url":"https://github.com/facebook/presto","homepage":"https://prestodb.io","size":103675,"stargazers_count":4169,"watchers_count":4169,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1113,"mirror_url":null,"open_issues_count":405,"forks":1113,"open_issues":405,"watchers":4169,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/3097"},"html":{"href":"https://github.com/facebook/presto/pull/3097"},"issue":{"href":"https://api.github.com/repos/facebook/presto/issues/3097"},"comments":{"href":"https://api.github.com/repos/facebook/presto/issues/3097/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/presto/pulls/3097/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/presto/pulls/3097/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/presto/statuses/17a152baabcfd1a15eee9c23e871e901b1f2df50"}}}}