{"action":"created","comment":{"url":"https://api.github.com/repos/druid-io/druid/pulls/comments/165249403","pull_request_review_id":93155648,"id":165249403,"diff_hunk":"@@ -49,7 +57,166 @@\n {\n   private static final Logger log = new Logger(InputRowSerde.class);\n \n-  public static final byte[] toBytes(final InputRow row, AggregatorFactory[] aggs, boolean reportParseExceptions)\n+  private static final IndexSerdeTypeHelper STRING_HELPER = new StringIndexSerdeTypeHelper();\n+  private static final IndexSerdeTypeHelper LONG_HELPER = new LongIndexSerdeTypeHelper();\n+  private static final IndexSerdeTypeHelper FLOAT_HELPER = new FloatIndexSerdeTypeHelper();\n+  private static final IndexSerdeTypeHelper DOUBLE_HELPER = new DoubleIndexSerdeTypeHelper();\n+\n+  public interface IndexSerdeTypeHelper<T>\n+  {\n+    ValueType getType();\n+\n+    byte[] serialize(Object value);","path":"indexing-hadoop/src/main/java/io/druid/indexer/InputRowSerde.java","position":null,"original_position":40,"commit_id":"f4cb2c574af11985cdd238aaca02d38e6db0454e","original_commit_id":"d1b5431c2721ea99e4748a5b736c1d5b87327f04","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars3.githubusercontent.com/u/8729063?v=4","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"body":"changed to  `void serialize(ByteArrayDataOutput out, Object value)`","created_at":"2018-02-01T03:04:40Z","updated_at":"2018-02-01T03:04:40Z","html_url":"https://github.com/druid-io/druid/pull/5312#discussion_r165249403","pull_request_url":"https://api.github.com/repos/druid-io/druid/pulls/5312","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments/165249403"},"html":{"href":"https://github.com/druid-io/druid/pull/5312#discussion_r165249403"},"pull_request":{"href":"https://api.github.com/repos/druid-io/druid/pulls/5312"}},"in_reply_to_id":165231706},"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/5312","id":166141912,"html_url":"https://github.com/druid-io/druid/pull/5312","diff_url":"https://github.com/druid-io/druid/pull/5312.diff","patch_url":"https://github.com/druid-io/druid/pull/5312.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/5312","number":5312,"state":"open","locked":false,"title":"Discard rows with unparseable numeric dimensions","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars3.githubusercontent.com/u/8729063?v=4","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"body":"Fixes #4879 \r\n\r\nThis is a different approach from #4509 that rejects rows with unparseable numeric dimensions instead of converting the unparseable values into zeros.\r\n\r\nThe patch also adjusts InputRowSerde to serialize dimension values with the types specified in the ingestion schema, instead of serializing all values as Strings. ParseException handling for dimensions has been added to InputRowSerde.toBytes();\r\n\r\nRegarding null/unparseable value handling:\r\n- Unparseable strings in numeric dimensions will cause the row to be rejected\r\n- The empty string in a numeric dimension is an unparseable value and will cause a row to be discarded, it is not equivalent to null\r\n- An actual null value (if a row explictly has a null value for a numeric dimension, or if the row is missing that dimension altogether) will be converted to 0. This should be compatible with the changes in #5278 which will allow numeric columns to store null values.","created_at":"2018-01-31T01:13:41Z","updated_at":"2018-02-01T03:04:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"443b1b5083561bc572a7b770e92dd099fbcfecd4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":{"url":"https://api.github.com/repos/druid-io/druid/milestones/24","html_url":"https://github.com/druid-io/druid/milestone/24","labels_url":"https://api.github.com/repos/druid-io/druid/milestones/24/labels","id":2781414,"number":24,"title":"0.12.0","description":"","creator":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars3.githubusercontent.com/u/8729063?v=4","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":161,"state":"open","created_at":"2017-09-20T20:11:45Z","updated_at":"2018-01-31T22:07:34Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/5312/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/5312/comments","review_comment_url":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/5312/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/f4cb2c574af11985cdd238aaca02d38e6db0454e","head":{"label":"jon-wei:npe_numeric_fix","ref":"npe_numeric_fix","sha":"f4cb2c574af11985cdd238aaca02d38e6db0454e","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars3.githubusercontent.com/u/8729063?v=4","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"repo":{"id":41450391,"name":"druid","full_name":"jon-wei/druid","owner":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars3.githubusercontent.com/u/8729063?v=4","gravatar_id":"","url":"https://api.github.com/users/jon-wei","html_url":"https://github.com/jon-wei","followers_url":"https://api.github.com/users/jon-wei/followers","following_url":"https://api.github.com/users/jon-wei/following{/other_user}","gists_url":"https://api.github.com/users/jon-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/jon-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon-wei/subscriptions","organizations_url":"https://api.github.com/users/jon-wei/orgs","repos_url":"https://api.github.com/users/jon-wei/repos","events_url":"https://api.github.com/users/jon-wei/events{/privacy}","received_events_url":"https://api.github.com/users/jon-wei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jon-wei/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/jon-wei/druid","forks_url":"https://api.github.com/repos/jon-wei/druid/forks","keys_url":"https://api.github.com/repos/jon-wei/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jon-wei/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jon-wei/druid/teams","hooks_url":"https://api.github.com/repos/jon-wei/druid/hooks","issue_events_url":"https://api.github.com/repos/jon-wei/druid/issues/events{/number}","events_url":"https://api.github.com/repos/jon-wei/druid/events","assignees_url":"https://api.github.com/repos/jon-wei/druid/assignees{/user}","branches_url":"https://api.github.com/repos/jon-wei/druid/branches{/branch}","tags_url":"https://api.github.com/repos/jon-wei/druid/tags","blobs_url":"https://api.github.com/repos/jon-wei/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jon-wei/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jon-wei/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/jon-wei/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jon-wei/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/jon-wei/druid/languages","stargazers_url":"https://api.github.com/repos/jon-wei/druid/stargazers","contributors_url":"https://api.github.com/repos/jon-wei/druid/contributors","subscribers_url":"https://api.github.com/repos/jon-wei/druid/subscribers","subscription_url":"https://api.github.com/repos/jon-wei/druid/subscription","commits_url":"https://api.github.com/repos/jon-wei/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/jon-wei/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/jon-wei/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/jon-wei/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/jon-wei/druid/contents/{+path}","compare_url":"https://api.github.com/repos/jon-wei/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jon-wei/druid/merges","archive_url":"https://api.github.com/repos/jon-wei/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jon-wei/druid/downloads","issues_url":"https://api.github.com/repos/jon-wei/druid/issues{/number}","pulls_url":"https://api.github.com/repos/jon-wei/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/jon-wei/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/jon-wei/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jon-wei/druid/labels{/name}","releases_url":"https://api.github.com/repos/jon-wei/druid/releases{/id}","deployments_url":"https://api.github.com/repos/jon-wei/druid/deployments","created_at":"2015-08-26T21:18:05Z","updated_at":"2016-01-12T02:23:00Z","pushed_at":"2018-02-01T03:02:38Z","git_url":"git://github.com/jon-wei/druid.git","ssh_url":"git@github.com:jon-wei/druid.git","clone_url":"https://github.com/jon-wei/druid.git","svn_url":"https://github.com/jon-wei/druid","homepage":"http://druid.io","size":132613,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"druid-io:master","ref":"master","sha":"3a69b0e5133132742086240e181060d9052923b4","user":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars0.githubusercontent.com/u/4203474?v=4","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"repo":{"id":6358188,"name":"druid","full_name":"druid-io/druid","owner":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars0.githubusercontent.com/u/4203474?v=4","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/druid-io/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":false,"url":"https://api.github.com/repos/druid-io/druid","forks_url":"https://api.github.com/repos/druid-io/druid/forks","keys_url":"https://api.github.com/repos/druid-io/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/druid-io/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/druid-io/druid/teams","hooks_url":"https://api.github.com/repos/druid-io/druid/hooks","issue_events_url":"https://api.github.com/repos/druid-io/druid/issues/events{/number}","events_url":"https://api.github.com/repos/druid-io/druid/events","assignees_url":"https://api.github.com/repos/druid-io/druid/assignees{/user}","branches_url":"https://api.github.com/repos/druid-io/druid/branches{/branch}","tags_url":"https://api.github.com/repos/druid-io/druid/tags","blobs_url":"https://api.github.com/repos/druid-io/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/druid-io/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/druid-io/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/druid-io/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/druid-io/druid/languages","stargazers_url":"https://api.github.com/repos/druid-io/druid/stargazers","contributors_url":"https://api.github.com/repos/druid-io/druid/contributors","subscribers_url":"https://api.github.com/repos/druid-io/druid/subscribers","subscription_url":"https://api.github.com/repos/druid-io/druid/subscription","commits_url":"https://api.github.com/repos/druid-io/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/druid-io/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/druid-io/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/druid-io/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/druid-io/druid/contents/{+path}","compare_url":"https://api.github.com/repos/druid-io/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/druid-io/druid/merges","archive_url":"https://api.github.com/repos/druid-io/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/druid-io/druid/downloads","issues_url":"https://api.github.com/repos/druid-io/druid/issues{/number}","pulls_url":"https://api.github.com/repos/druid-io/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/druid-io/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/druid-io/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/druid-io/druid/labels{/name}","releases_url":"https://api.github.com/repos/druid-io/druid/releases{/id}","deployments_url":"https://api.github.com/repos/druid-io/druid/deployments","created_at":"2012-10-23T19:08:07Z","updated_at":"2018-02-01T02:55:11Z","pushed_at":"2018-02-01T03:02:42Z","git_url":"git://github.com/druid-io/druid.git","ssh_url":"git@github.com:druid-io/druid.git","clone_url":"https://github.com/druid-io/druid.git","svn_url":"https://github.com/druid-io/druid","homepage":"http://druid.io","size":133685,"stargazers_count":6046,"watchers_count":6046,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1491,"mirror_url":null,"archived":false,"open_issues_count":893,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1491,"open_issues":893,"watchers":6046,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/5312"},"html":{"href":"https://github.com/druid-io/druid/pull/5312"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/5312"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/5312/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/5312/comments"},"review_comment":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/druid-io/druid/pulls/5312/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/f4cb2c574af11985cdd238aaca02d38e6db0454e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jon-wei"}}