{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/62850239","id":62850239,"diff_hunk":"@@ -0,0 +1,182 @@\n+/**\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ * <p/>\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ * <p/>\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.apache.flink.api.java.io.jdbc;\n+\n+import java.io.IOException;\n+import java.io.OutputStream;\n+import java.sql.Connection;\n+import java.sql.DriverManager;\n+import java.sql.SQLException;\n+import java.sql.Statement;\n+\n+import org.junit.After;\n+import org.junit.AfterClass;\n+import org.junit.Assert;\n+import org.junit.BeforeClass;\n+\n+/**\n+ * Base test class for JDBC Input and Output formats\n+ */\n+public class JDBCTestBase {\n+\t\n+\tpublic static final String DRIVER_CLASS = \"org.apache.derby.jdbc.EmbeddedDriver\";\n+\tpublic static final String DB_URL = \"jdbc:derby:memory:ebookshop\";\n+\tpublic static final String INPUT_TABLE = \"books\";\n+\tpublic static final String OUTPUT_TABLE = \"newbooks\";\n+\tpublic static final String SELECT_ALL_BOOKS = \"select * from \" + INPUT_TABLE;\n+\tpublic static final String SELECT_ALL_NEWBOOKS = \"select * from \" + OUTPUT_TABLE;\n+\tpublic static final String SELECT_EMPTY = \"select * from books WHERE QTY < 0\";\n+\tpublic static final String INSERT_TEMPLATE = \"insert into %s (id, title, author, price, qty) values (?,?,?,?,?)\";\n+\tpublic static final String SELECT_ALL_BOOKS_SPLIT_BY_ID = JDBCTestBase.SELECT_ALL_BOOKS + \" WHERE id BETWEEN ? AND ?\";\n+\tpublic static final String SELECT_ALL_BOOKS_SPLIT_BY_AUTHOR = JDBCTestBase.SELECT_ALL_BOOKS + \" WHERE author = ?\";\n+\t\n+\tprotected JDBCInputFormat jdbcInputFormat;\n+\tprotected JDBCOutputFormat jdbcOutputFormat;\n+\n+\tprotected static Connection conn;\n+\n+\tpublic static final Object[][] testData = {","path":"flink-batch-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCTestBase.java","position":53,"original_position":53,"commit_id":"eab26a65c46c185e5294e5e1913072db53c62965","original_commit_id":"eab26a65c46c185e5294e5e1913072db53c62965","user":{"login":"fpompermaier","id":3776037,"avatar_url":"https://avatars.githubusercontent.com/u/3776037?v=3","gravatar_id":"","url":"https://api.github.com/users/fpompermaier","html_url":"https://github.com/fpompermaier","followers_url":"https://api.github.com/users/fpompermaier/followers","following_url":"https://api.github.com/users/fpompermaier/following{/other_user}","gists_url":"https://api.github.com/users/fpompermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/fpompermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpompermaier/subscriptions","organizations_url":"https://api.github.com/users/fpompermaier/orgs","repos_url":"https://api.github.com/users/fpompermaier/repos","events_url":"https://api.github.com/users/fpompermaier/events{/privacy}","received_events_url":"https://api.github.com/users/fpompermaier/received_events","type":"User","site_admin":false},"body":"The record with id 1010 contains already a null field..isn't that sufficient?","created_at":"2016-05-11T13:46:54Z","updated_at":"2016-05-11T13:46:54Z","html_url":"https://github.com/apache/flink/pull/1941#discussion_r62850239","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/1941","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/62850239"},"html":{"href":"https://github.com/apache/flink/pull/1941#discussion_r62850239"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/1941"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/1941","id":67923981,"html_url":"https://github.com/apache/flink/pull/1941","diff_url":"https://github.com/apache/flink/pull/1941.diff","patch_url":"https://github.com/apache/flink/pull/1941.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/1941","number":1941,"state":"open","locked":false,"title":"Flink 3750 fixed","user":{"login":"fpompermaier","id":3776037,"avatar_url":"https://avatars.githubusercontent.com/u/3776037?v=3","gravatar_id":"","url":"https://api.github.com/users/fpompermaier","html_url":"https://github.com/fpompermaier","followers_url":"https://api.github.com/users/fpompermaier/followers","following_url":"https://api.github.com/users/fpompermaier/following{/other_user}","gists_url":"https://api.github.com/users/fpompermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/fpompermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpompermaier/subscriptions","organizations_url":"https://api.github.com/users/fpompermaier/orgs","repos_url":"https://api.github.com/users/fpompermaier/repos","events_url":"https://api.github.com/users/fpompermaier/events{/privacy}","received_events_url":"https://api.github.com/users/fpompermaier/received_events","type":"User","site_admin":false},"body":"Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.\r\nIf your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).\r\nIn addition to going through the list, please provide a meaningful description of your changes.\r\n\r\n- [X] General\r\n  - The pull request references the related JIRA issue\r\n  - The pull request addresses only one issue\r\n  - Each commit in the PR has a meaningful commit message\r\n\r\n- [X] Documentation\r\n  - Documentation has been added for new functionality\r\n  - Old documentation affected by the pull request has been updated\r\n  - JavaDoc for public methods has been added\r\n\r\n- [X] Tests & Build\r\n  - Functionality added by the pull request is covered by tests\r\n  - `mvn clean verify` has been executed successfully locally or a Travis build has passed\r\n\r\n---------\r\nNew cleaned PR aligned with the current master","created_at":"2016-04-26T17:15:57Z","updated_at":"2016-05-11T13:46:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92abba57ecd9d007ffaeb011e7fa4d14df2f19c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/1941/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/1941/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/1941/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/eab26a65c46c185e5294e5e1913072db53c62965","head":{"label":"fpompermaier:FLINK-3750-fixed","ref":"FLINK-3750-fixed","sha":"eab26a65c46c185e5294e5e1913072db53c62965","user":{"login":"fpompermaier","id":3776037,"avatar_url":"https://avatars.githubusercontent.com/u/3776037?v=3","gravatar_id":"","url":"https://api.github.com/users/fpompermaier","html_url":"https://github.com/fpompermaier","followers_url":"https://api.github.com/users/fpompermaier/followers","following_url":"https://api.github.com/users/fpompermaier/following{/other_user}","gists_url":"https://api.github.com/users/fpompermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/fpompermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpompermaier/subscriptions","organizations_url":"https://api.github.com/users/fpompermaier/orgs","repos_url":"https://api.github.com/users/fpompermaier/repos","events_url":"https://api.github.com/users/fpompermaier/events{/privacy}","received_events_url":"https://api.github.com/users/fpompermaier/received_events","type":"User","site_admin":false},"repo":{"id":34671677,"name":"flink","full_name":"fpompermaier/flink","owner":{"login":"fpompermaier","id":3776037,"avatar_url":"https://avatars.githubusercontent.com/u/3776037?v=3","gravatar_id":"","url":"https://api.github.com/users/fpompermaier","html_url":"https://github.com/fpompermaier","followers_url":"https://api.github.com/users/fpompermaier/followers","following_url":"https://api.github.com/users/fpompermaier/following{/other_user}","gists_url":"https://api.github.com/users/fpompermaier/gists{/gist_id}","starred_url":"https://api.github.com/users/fpompermaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpompermaier/subscriptions","organizations_url":"https://api.github.com/users/fpompermaier/orgs","repos_url":"https://api.github.com/users/fpompermaier/repos","events_url":"https://api.github.com/users/fpompermaier/events{/privacy}","received_events_url":"https://api.github.com/users/fpompermaier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fpompermaier/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/fpompermaier/flink","forks_url":"https://api.github.com/repos/fpompermaier/flink/forks","keys_url":"https://api.github.com/repos/fpompermaier/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fpompermaier/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fpompermaier/flink/teams","hooks_url":"https://api.github.com/repos/fpompermaier/flink/hooks","issue_events_url":"https://api.github.com/repos/fpompermaier/flink/issues/events{/number}","events_url":"https://api.github.com/repos/fpompermaier/flink/events","assignees_url":"https://api.github.com/repos/fpompermaier/flink/assignees{/user}","branches_url":"https://api.github.com/repos/fpompermaier/flink/branches{/branch}","tags_url":"https://api.github.com/repos/fpompermaier/flink/tags","blobs_url":"https://api.github.com/repos/fpompermaier/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fpompermaier/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fpompermaier/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/fpompermaier/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fpompermaier/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/fpompermaier/flink/languages","stargazers_url":"https://api.github.com/repos/fpompermaier/flink/stargazers","contributors_url":"https://api.github.com/repos/fpompermaier/flink/contributors","subscribers_url":"https://api.github.com/repos/fpompermaier/flink/subscribers","subscription_url":"https://api.github.com/repos/fpompermaier/flink/subscription","commits_url":"https://api.github.com/repos/fpompermaier/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/fpompermaier/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/fpompermaier/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/fpompermaier/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/fpompermaier/flink/contents/{+path}","compare_url":"https://api.github.com/repos/fpompermaier/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fpompermaier/flink/merges","archive_url":"https://api.github.com/repos/fpompermaier/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fpompermaier/flink/downloads","issues_url":"https://api.github.com/repos/fpompermaier/flink/issues{/number}","pulls_url":"https://api.github.com/repos/fpompermaier/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/fpompermaier/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/fpompermaier/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fpompermaier/flink/labels{/name}","releases_url":"https://api.github.com/repos/fpompermaier/flink/releases{/id}","deployments_url":"https://api.github.com/repos/fpompermaier/flink/deployments","created_at":"2015-04-27T14:32:03Z","updated_at":"2016-04-13T14:35:41Z","pushed_at":"2016-05-10T07:28:54Z","git_url":"git://github.com/fpompermaier/flink.git","ssh_url":"git@github.com:fpompermaier/flink.git","clone_url":"https://github.com/fpompermaier/flink.git","svn_url":"https://github.com/fpompermaier/flink","homepage":null,"size":87988,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"9d6194fa305250db9e713f17a87826a5695fc846","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-05-11T08:55:02Z","pushed_at":"2016-05-11T12:58:53Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":174601,"stargazers_count":1283,"watchers_count":1283,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":796,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":91,"forks":796,"open_issues":91,"watchers":1283,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/1941"},"html":{"href":"https://github.com/apache/flink/pull/1941"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/1941"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/1941/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/1941/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/1941/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/eab26a65c46c185e5294e5e1913072db53c62965"}}}}