{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/25834522","id":25834522,"diff_hunk":"@@ -64,15 +66,25 @@\n \tprivate transient int commentCount;\n \n \tprivate transient int invalidLineCount;\n+\n+\tprivate PojoTypeInfo<OUT> pojoTypeInfo = null;\n \t\n \t\n \tpublic CsvInputFormat(Path filePath) {\n \t\tsuper(filePath);\n-\t}\t\n+\t}\n+\n+\tpublic CsvInputFormat(Path filePath, PojoTypeInfo<OUT> pojoTypeInfo) {\n+\t\tsuper(filePath);\n+\n+\t\tPreconditions.checkNotNull(pojoTypeInfo, \"The TypeInformation is required for getting the POJO fields.\");\n+\t\tthis.pojoTypeInfo = pojoTypeInfo;\n+\t\tsetAccessibleToField();\n+\t}\n \t\n \tpublic CsvInputFormat(Path filePath, Class<?> ... types) {","path":"flink-java/src/main/java/org/apache/flink/api/java/io/CsvInputFormat.java","position":46,"original_position":46,"commit_id":"c44f270ba1b624daa27d3ca04d8355e4823e6c1a","original_commit_id":"c44f270ba1b624daa27d3ca04d8355e4823e6c1a","user":{"login":"chiwanpark","id":1941681,"avatar_url":"https://avatars.githubusercontent.com/u/1941681?v=3","gravatar_id":"","url":"https://api.github.com/users/chiwanpark","html_url":"https://github.com/chiwanpark","followers_url":"https://api.github.com/users/chiwanpark/followers","following_url":"https://api.github.com/users/chiwanpark/following{/other_user}","gists_url":"https://api.github.com/users/chiwanpark/gists{/gist_id}","starred_url":"https://api.github.com/users/chiwanpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiwanpark/subscriptions","organizations_url":"https://api.github.com/users/chiwanpark/orgs","repos_url":"https://api.github.com/users/chiwanpark/repos","events_url":"https://api.github.com/users/chiwanpark/events{/privacy}","received_events_url":"https://api.github.com/users/chiwanpark/received_events","type":"User","site_admin":false},"body":"@fhueske I think that we can change the constructors to receive TypeInformation<T> instead of a Class<?>[]. How about this?","created_at":"2015-03-05T02:10:43Z","updated_at":"2015-03-05T02:10:43Z","html_url":"https://github.com/apache/flink/pull/426#discussion_r25834522","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/25834522"},"html":{"href":"https://github.com/apache/flink/pull/426#discussion_r25834522"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/426","id":29632254,"html_url":"https://github.com/apache/flink/pull/426","diff_url":"https://github.com/apache/flink/pull/426.diff","patch_url":"https://github.com/apache/flink/pull/426.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/426","number":426,"state":"open","locked":false,"title":"[FLINK-1512] Add CsvReader for reading into POJOs.","user":{"login":"chiwanpark","id":1941681,"avatar_url":"https://avatars.githubusercontent.com/u/1941681?v=3","gravatar_id":"","url":"https://api.github.com/users/chiwanpark","html_url":"https://github.com/chiwanpark","followers_url":"https://api.github.com/users/chiwanpark/followers","following_url":"https://api.github.com/users/chiwanpark/following{/other_user}","gists_url":"https://api.github.com/users/chiwanpark/gists{/gist_id}","starred_url":"https://api.github.com/users/chiwanpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiwanpark/subscriptions","organizations_url":"https://api.github.com/users/chiwanpark/orgs","repos_url":"https://api.github.com/users/chiwanpark/repos","events_url":"https://api.github.com/users/chiwanpark/events{/privacy}","received_events_url":"https://api.github.com/users/chiwanpark/received_events","type":"User","site_admin":false},"body":"This PR contains following changes.\r\n\r\n* `CsvInputFormat` and `ScalaCsvInputFormat` can receive POJO type as generic parameter\r\n* Add `pojoType(Class<T> targetType)` into `CsvReader` (Java API)\r\n* Modify `readCsvFile` method in `ExecutionEnvironment` (Scala API)\r\n* Add unit tests for `CsvInputFormat` and `ScalaCsvInputFormat`","created_at":"2015-02-19T17:42:33Z","updated_at":"2015-03-05T02:10:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c29b28dda07db24959db485d506045d0ba9cfcfd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/426/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/426/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/426/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/c44f270ba1b624daa27d3ca04d8355e4823e6c1a","head":{"label":"chiwanpark:FLINK-1512","ref":"FLINK-1512","sha":"c44f270ba1b624daa27d3ca04d8355e4823e6c1a","user":{"login":"chiwanpark","id":1941681,"avatar_url":"https://avatars.githubusercontent.com/u/1941681?v=3","gravatar_id":"","url":"https://api.github.com/users/chiwanpark","html_url":"https://github.com/chiwanpark","followers_url":"https://api.github.com/users/chiwanpark/followers","following_url":"https://api.github.com/users/chiwanpark/following{/other_user}","gists_url":"https://api.github.com/users/chiwanpark/gists{/gist_id}","starred_url":"https://api.github.com/users/chiwanpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiwanpark/subscriptions","organizations_url":"https://api.github.com/users/chiwanpark/orgs","repos_url":"https://api.github.com/users/chiwanpark/repos","events_url":"https://api.github.com/users/chiwanpark/events{/privacy}","received_events_url":"https://api.github.com/users/chiwanpark/received_events","type":"User","site_admin":false},"repo":{"id":26487725,"name":"flink","full_name":"chiwanpark/flink","owner":{"login":"chiwanpark","id":1941681,"avatar_url":"https://avatars.githubusercontent.com/u/1941681?v=3","gravatar_id":"","url":"https://api.github.com/users/chiwanpark","html_url":"https://github.com/chiwanpark","followers_url":"https://api.github.com/users/chiwanpark/followers","following_url":"https://api.github.com/users/chiwanpark/following{/other_user}","gists_url":"https://api.github.com/users/chiwanpark/gists{/gist_id}","starred_url":"https://api.github.com/users/chiwanpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiwanpark/subscriptions","organizations_url":"https://api.github.com/users/chiwanpark/orgs","repos_url":"https://api.github.com/users/chiwanpark/repos","events_url":"https://api.github.com/users/chiwanpark/events{/privacy}","received_events_url":"https://api.github.com/users/chiwanpark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chiwanpark/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/chiwanpark/flink","forks_url":"https://api.github.com/repos/chiwanpark/flink/forks","keys_url":"https://api.github.com/repos/chiwanpark/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chiwanpark/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chiwanpark/flink/teams","hooks_url":"https://api.github.com/repos/chiwanpark/flink/hooks","issue_events_url":"https://api.github.com/repos/chiwanpark/flink/issues/events{/number}","events_url":"https://api.github.com/repos/chiwanpark/flink/events","assignees_url":"https://api.github.com/repos/chiwanpark/flink/assignees{/user}","branches_url":"https://api.github.com/repos/chiwanpark/flink/branches{/branch}","tags_url":"https://api.github.com/repos/chiwanpark/flink/tags","blobs_url":"https://api.github.com/repos/chiwanpark/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chiwanpark/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chiwanpark/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/chiwanpark/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chiwanpark/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/chiwanpark/flink/languages","stargazers_url":"https://api.github.com/repos/chiwanpark/flink/stargazers","contributors_url":"https://api.github.com/repos/chiwanpark/flink/contributors","subscribers_url":"https://api.github.com/repos/chiwanpark/flink/subscribers","subscription_url":"https://api.github.com/repos/chiwanpark/flink/subscription","commits_url":"https://api.github.com/repos/chiwanpark/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/chiwanpark/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/chiwanpark/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/chiwanpark/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/chiwanpark/flink/contents/{+path}","compare_url":"https://api.github.com/repos/chiwanpark/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chiwanpark/flink/merges","archive_url":"https://api.github.com/repos/chiwanpark/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chiwanpark/flink/downloads","issues_url":"https://api.github.com/repos/chiwanpark/flink/issues{/number}","pulls_url":"https://api.github.com/repos/chiwanpark/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/chiwanpark/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/chiwanpark/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chiwanpark/flink/labels{/name}","releases_url":"https://api.github.com/repos/chiwanpark/flink/releases{/id}","created_at":"2014-11-11T14:10:24Z","updated_at":"2015-03-04T04:03:17Z","pushed_at":"2015-03-04T09:02:29Z","git_url":"git://github.com/chiwanpark/flink.git","ssh_url":"git@github.com:chiwanpark/flink.git","clone_url":"https://github.com/chiwanpark/flink.git","svn_url":"https://github.com/chiwanpark/flink","homepage":null,"size":41702,"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":"94a66d570e4bb40824813911a4f1bb47a8bf8b90","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}","created_at":"2014-06-07T07:00:10Z","updated_at":"2015-03-04T22:41:38Z","pushed_at":"2015-03-04T22:41:38Z","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":2756579,"stargazers_count":303,"watchers_count":303,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":168,"mirror_url":"git://git.apache.org/incubator-flink.git","open_issues_count":35,"forks":168,"open_issues":35,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/426"},"html":{"href":"https://github.com/apache/flink/pull/426"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/426"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/c44f270ba1b624daa27d3ca04d8355e4823e6c1a"}}}}