{"action":"created","comment":{"url":"https://api.github.com/repos/druid-io/druid/pulls/comments/78099322","id":78099322,"diff_hunk":"@@ -331,90 +334,147 @@ public static void validateRowValues(\n     final Indexed<String> dim1Names = adapter1.getDimensionNames();\n     final Indexed<String> dim2Names = adapter2.getDimensionNames();\n     for (int i = 0; i < dims1.length; ++i) {\n-      final int[] dim1Vals = dims1[i];\n-      final int[] dim2Vals = dims2[i];\n+      final Object dim1Vals = dims1[i];","path":"processing/src/main/java/io/druid/segment/IndexIO.java","position":41,"original_position":41,"commit_id":"ecdc32ffca7d17f114c223f96129cf96ff92003a","original_commit_id":"ecdc32ffca7d17f114c223f96129cf96ff92003a","user":{"login":"drcrallen","id":8213081,"avatar_url":"https://avatars.githubusercontent.com/u/8213081?v=3","gravatar_id":"","url":"https://api.github.com/users/drcrallen","html_url":"https://github.com/drcrallen","followers_url":"https://api.github.com/users/drcrallen/followers","following_url":"https://api.github.com/users/drcrallen/following{/other_user}","gists_url":"https://api.github.com/users/drcrallen/gists{/gist_id}","starred_url":"https://api.github.com/users/drcrallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcrallen/subscriptions","organizations_url":"https://api.github.com/users/drcrallen/orgs","repos_url":"https://api.github.com/users/drcrallen/repos","events_url":"https://api.github.com/users/drcrallen/events{/privacy}","received_events_url":"https://api.github.com/users/drcrallen/received_events","type":"User","site_admin":false},"body":"ah, I think I see. there are checks for dictionary encoding all through here. That doesn't seem like a sustainable solution. Is it possible to have the checks be done in a way that allows the capabilities to control the type assumptions?","created_at":"2016-09-08T22:15:12Z","updated_at":"2016-09-08T22:15:12Z","html_url":"https://github.com/druid-io/druid/pull/3217#discussion_r78099322","pull_request_url":"https://api.github.com/repos/druid-io/druid/pulls/3217","_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments/78099322"},"html":{"href":"https://github.com/druid-io/druid/pull/3217#discussion_r78099322"},"pull_request":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3217"}}},"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/3217","id":76363614,"html_url":"https://github.com/druid-io/druid/pull/3217","diff_url":"https://github.com/druid-io/druid/pull/3217.diff","patch_url":"https://github.com/druid-io/druid/pull/3217.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/3217","number":3217,"state":"open","locked":false,"title":"Add dimension handling interface for ingestion and segment creation","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars.githubusercontent.com/u/8729063?v=3","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":"Description\r\n--------------\r\nThis PR is a trimmed down version of #2760 that introduces a generic dimension handling infrastructure used for Long/Float dimension handling. However, only String dimensions are currently supported, to keep the patch at a reviewable size. Actual support for Longs/Floats will come in a later PR.\r\n\r\nAt a high level, type-specific handling for dimensions in the IncrementalIndex, IndexMerger has been extracted into a new interface. There are 3 associated classes with the new interface:\r\n\r\nDimensionHandler: Top level class, provides comparators and used to create the other 3 classes\r\nDimensionIndexer: Handles logic related to in-memory ingestion of rows (IncrementalIndex)\r\nDimensionMerger: Handles logic related to merging of segments (IndexMerger)\r\n\r\nStringDimensionHandler contains the implementations of these classes for String dimensions.\r\n\r\nValidation\r\n--------------\r\nAs this PR significantly refactors the indexing and segment creation code, it has the following risks:\r\n- Possible performance degradation\r\n- Regression failures\r\n\r\nTo address these risks, the following validation strategies were used:\r\n\r\n* Performance Degradation\r\nBenchmarks measuring the performance of IncrementalIndex row adds, IncrementalIndex reads, and segment merge/persist indicate that this PR does not introduce performance degradations in affected areas.\r\n\r\n* Regression failures\r\nThis PR passes the Druid unit tests and integration tests. The hadoop integration test (ITHadoopIndexTest) was run/verified manually.\r\n\r\n\r\n\r\n-----\r\n\r\nBenchmarks from a c4.8xlarge\r\n\r\npatch\r\n```\r\nBenchmark                                      (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt       Score       Error  Units\r\nIncrementalIndexReadBenchmark.read                 true            750000     basic  avgt   50  334866.077 ±  5572.233  us/op\r\nIncrementalIndexReadBenchmark.read                false            750000     basic  avgt   50  377260.561 ± 29860.209  us/op\r\nIncrementalIndexReadBenchmark.readWithFilters      true            750000     basic  avgt   50  279812.716 ±  3370.998  us/op\r\nIncrementalIndexReadBenchmark.readWithFilters     false            750000     basic  avgt   50  326096.952 ±  2870.442  us/op\r\n\r\nBenchmark                        (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt       Score      Error  Units\r\nIndexIngestionBenchmark.addRows      true             75000     basic  avgt   50  384164.000 ± 1966.527  us/op\r\nIndexIngestionBenchmark.addRows     false             75000     basic  avgt   50  399771.783 ± 2446.356  us/op\r\n\r\nBenchmark                   ( numSegments)  (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt        Score        Error  Units\r\nIndexMergeBenchmark.merge                5      true             75000     basic  avgt   50  5448759.483 ± 159695.715  us/op\r\nIndexMergeBenchmark.merge                5     false             75000     basic  avgt   50  5302718.895 ± 178994.287  us/op\r\nIndexMergeBenchmark.mergeV9              5      true             75000     basic  avgt   50  4533349.734 ± 316551.870  us/op\r\nIndexMergeBenchmark.mergeV9              5     false             75000     basic  avgt   50  4460183.171 ± 287253.950  us/op\r\n\r\nBenchmark                        (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt        Score        Error  Units\r\nIndexPersistBenchmark.persist        true             75000     basic  avgt   50  1306846.208 ± 170797.750  us/op\r\nIndexPersistBenchmark.persist       false             75000     basic  avgt   50  1347429.256 ± 189093.734  us/op\r\nIndexPersistBenchmark.persistV9      true             75000     basic  avgt   50  1205900.253 ± 181631.734  us/op\r\nIndexPersistBenchmark.persistV9     false             75000     basic  avgt   50  1210533.192 ± 149366.322  us/op\r\n```\r\n\r\nmaster\r\n```\r\nBenchmark                                      (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt       Score       Error  Units\r\nIncrementalIndexReadBenchmark.read                 true            750000     basic  avgt   50  338904.783 ±  9734.948  us/op\r\nIncrementalIndexReadBenchmark.read                false            750000     basic  avgt   50  404326.322 ± 34762.840  us/op\r\nIncrementalIndexReadBenchmark.readWithFilters      true            750000     basic  avgt   50  281539.062 ±  4068.100  us/op\r\nIncrementalIndexReadBenchmark.readWithFilters     false            750000     basic  avgt   50  341720.741 ±  5290.862  us/op\r\n\r\nBenchmark                        (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt       Score      Error  Units\r\nIndexIngestionBenchmark.addRows      true             75000     basic  avgt   50  386509.637 ± 2585.987  us/op\r\nIndexIngestionBenchmark.addRows     false             75000     basic  avgt   50  399927.398 ± 2514.297  us/op\r\n\r\nBenchmark                   ( numSegments)  (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt        Score        Error  Units\r\nIndexMergeBenchmark.merge                5      true             75000     basic  avgt   50  6430053.684 ± 298164.558  us/op\r\nIndexMergeBenchmark.merge                5     false             75000     basic  avgt   50  6461107.881 ± 356905.476  us/op\r\nIndexMergeBenchmark.mergeV9              5      true             75000     basic  avgt   50  5003605.414 ± 265774.052  us/op\r\nIndexMergeBenchmark.mergeV9              5     false             75000     basic  avgt   50  5147752.762 ± 330098.556  us/op\r\n\r\nBenchmark                        (rollup)  (rowsPerSegment)  (schema)  Mode  Cnt        Score        Error  Units\r\nIndexPersistBenchmark.persist        true             75000     basic  avgt   50  1366495.093 ± 179354.995  us/op\r\nIndexPersistBenchmark.persist       false             75000     basic  avgt   50  1414207.294 ± 208999.251  us/op\r\nIndexPersistBenchmark.persistV9      true             75000     basic  avgt   50  1297002.648 ± 133262.718  us/op\r\nIndexPersistBenchmark.persistV9     false             75000     basic  avgt   50  1343949.275 ± 167867.933  us/op\r\n```","created_at":"2016-07-06T00:34:22Z","updated_at":"2016-09-08T22:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"656d78a71900fe32b2aae1ab8745b7a5f61e93b7","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/druid-io/druid/milestones/20","html_url":"https://github.com/druid-io/druid/milestones/0.9.2","labels_url":"https://api.github.com/repos/druid-io/druid/milestones/20/labels","id":1571409,"number":20,"title":"0.9.2","description":"","creator":{"login":"fjy","id":428325,"avatar_url":"https://avatars.githubusercontent.com/u/428325?v=3","gravatar_id":"","url":"https://api.github.com/users/fjy","html_url":"https://github.com/fjy","followers_url":"https://api.github.com/users/fjy/followers","following_url":"https://api.github.com/users/fjy/following{/other_user}","gists_url":"https://api.github.com/users/fjy/gists{/gist_id}","starred_url":"https://api.github.com/users/fjy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjy/subscriptions","organizations_url":"https://api.github.com/users/fjy/orgs","repos_url":"https://api.github.com/users/fjy/repos","events_url":"https://api.github.com/users/fjy/events{/privacy}","received_events_url":"https://api.github.com/users/fjy/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":153,"state":"open","created_at":"2016-02-08T22:01:21Z","updated_at":"2016-09-08T21:57:39Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/3217/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/3217/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/3217/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/ecdc32ffca7d17f114c223f96129cf96ff92003a","head":{"label":"jon-wei:dimension_interface_part1","ref":"dimension_interface_part1","sha":"ecdc32ffca7d17f114c223f96129cf96ff92003a","user":{"login":"jon-wei","id":8729063,"avatar_url":"https://avatars.githubusercontent.com/u/8729063?v=3","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://avatars.githubusercontent.com/u/8729063?v=3","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":"2016-09-07T21:57:29Z","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":111076,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"druid-io:master","ref":"master","sha":"3b6c81e7c0110333151bae525123fccc7934921d","user":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","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://avatars.githubusercontent.com/u/4203474?v=3","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":"2016-09-08T16:07:20Z","pushed_at":"2016-09-08T22:15:01Z","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":156190,"stargazers_count":3687,"watchers_count":3687,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":861,"mirror_url":null,"open_issues_count":513,"forks":861,"open_issues":513,"watchers":3687,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3217"},"html":{"href":"https://github.com/druid-io/druid/pull/3217"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/3217"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/3217/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3217/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/3217/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/ecdc32ffca7d17f114c223f96129cf96ff92003a"}}}}
{"actor":{"display_login":"drcrallen"}}