{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/56744766","id":56744766,"diff_hunk":"@@ -0,0 +1,76 @@\n+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\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 com.facebook.presto.hive.parquet;\n+\n+import io.airlift.slice.Slice;\n+\n+import java.util.Arrays;\n+\n+import static com.google.common.base.MoreObjects.toStringHelper;\n+import static com.google.common.primitives.Ints.checkedCast;\n+import static io.airlift.slice.Slices.wrappedBuffer;\n+import static java.util.Objects.requireNonNull;\n+\n+public class ParquetDictionaryPage\n+        extends ParquetPage\n+{\n+    private final Slice slice;\n+    private final int dictionarySize;\n+    private final ParquetEncoding encoding;\n+\n+    public ParquetDictionaryPage(Slice slice, int dictionarySize, ParquetEncoding encoding)\n+    {\n+        this(slice, checkedCast(slice.length()), dictionarySize, encoding);","path":"presto-hive/src/main/java/com/facebook/presto/hive/parquet/ParquetDictionaryPage.java","position":34,"original_position":34,"commit_id":"9c48930c31fe452f55bc91c749c87410411b81a1","original_commit_id":"9c48930c31fe452f55bc91c749c87410411b81a1","user":{"login":"nezihyigitbasi","id":1223839,"avatar_url":"https://avatars.githubusercontent.com/u/1223839?v=3","gravatar_id":"","url":"https://api.github.com/users/nezihyigitbasi","html_url":"https://github.com/nezihyigitbasi","followers_url":"https://api.github.com/users/nezihyigitbasi/followers","following_url":"https://api.github.com/users/nezihyigitbasi/following{/other_user}","gists_url":"https://api.github.com/users/nezihyigitbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/nezihyigitbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezihyigitbasi/subscriptions","organizations_url":"https://api.github.com/users/nezihyigitbasi/orgs","repos_url":"https://api.github.com/users/nezihyigitbasi/repos","events_url":"https://api.github.com/users/nezihyigitbasi/events{/privacy}","received_events_url":"https://api.github.com/users/nezihyigitbasi/received_events","type":"User","site_admin":false},"body":"`checkCast` not needed here. same below.","created_at":"2016-03-19T06:00:05Z","updated_at":"2016-03-19T06:00:05Z","html_url":"https://github.com/prestodb/presto/pull/4823#discussion_r56744766","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/4823","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/56744766"},"html":{"href":"https://github.com/prestodb/presto/pull/4823#discussion_r56744766"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/4823"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/4823","id":63405256,"html_url":"https://github.com/prestodb/presto/pull/4823","diff_url":"https://github.com/prestodb/presto/pull/4823.diff","patch_url":"https://github.com/prestodb/presto/pull/4823.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/4823","number":4823,"state":"open","locked":false,"title":"Parquet reads data in Slice and use pure java compression","user":{"login":"zhenxiao","id":1274155,"avatar_url":"https://avatars.githubusercontent.com/u/1274155?v=3","gravatar_id":"","url":"https://api.github.com/users/zhenxiao","html_url":"https://github.com/zhenxiao","followers_url":"https://api.github.com/users/zhenxiao/followers","following_url":"https://api.github.com/users/zhenxiao/following{/other_user}","gists_url":"https://api.github.com/users/zhenxiao/gists{/gist_id}","starred_url":"https://api.github.com/users/zhenxiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhenxiao/subscriptions","organizations_url":"https://api.github.com/users/zhenxiao/orgs","repos_url":"https://api.github.com/users/zhenxiao/repos","events_url":"https://api.github.com/users/zhenxiao/events{/privacy}","received_events_url":"https://api.github.com/users/zhenxiao/received_events","type":"User","site_admin":false},"body":"Refactor new Parquet reader code to read data in slice and use pure java compression algorithm\r\n@dain next step is to add pure java lzo compression support","created_at":"2016-03-18T16:59:19Z","updated_at":"2016-03-19T06:00:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20467566a9745c8369d73bea2eb5aff903568eba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/4823/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/4823/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/4823/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/9c48930c31fe452f55bc91c749c87410411b81a1","head":{"label":"zhenxiao:parquet-dictionary","ref":"parquet-dictionary","sha":"9c48930c31fe452f55bc91c749c87410411b81a1","user":{"login":"zhenxiao","id":1274155,"avatar_url":"https://avatars.githubusercontent.com/u/1274155?v=3","gravatar_id":"","url":"https://api.github.com/users/zhenxiao","html_url":"https://github.com/zhenxiao","followers_url":"https://api.github.com/users/zhenxiao/followers","following_url":"https://api.github.com/users/zhenxiao/following{/other_user}","gists_url":"https://api.github.com/users/zhenxiao/gists{/gist_id}","starred_url":"https://api.github.com/users/zhenxiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhenxiao/subscriptions","organizations_url":"https://api.github.com/users/zhenxiao/orgs","repos_url":"https://api.github.com/users/zhenxiao/repos","events_url":"https://api.github.com/users/zhenxiao/events{/privacy}","received_events_url":"https://api.github.com/users/zhenxiao/received_events","type":"User","site_admin":false},"repo":{"id":17963913,"name":"presto","full_name":"zhenxiao/presto","owner":{"login":"zhenxiao","id":1274155,"avatar_url":"https://avatars.githubusercontent.com/u/1274155?v=3","gravatar_id":"","url":"https://api.github.com/users/zhenxiao","html_url":"https://github.com/zhenxiao","followers_url":"https://api.github.com/users/zhenxiao/followers","following_url":"https://api.github.com/users/zhenxiao/following{/other_user}","gists_url":"https://api.github.com/users/zhenxiao/gists{/gist_id}","starred_url":"https://api.github.com/users/zhenxiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhenxiao/subscriptions","organizations_url":"https://api.github.com/users/zhenxiao/orgs","repos_url":"https://api.github.com/users/zhenxiao/repos","events_url":"https://api.github.com/users/zhenxiao/events{/privacy}","received_events_url":"https://api.github.com/users/zhenxiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhenxiao/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/zhenxiao/presto","forks_url":"https://api.github.com/repos/zhenxiao/presto/forks","keys_url":"https://api.github.com/repos/zhenxiao/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhenxiao/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhenxiao/presto/teams","hooks_url":"https://api.github.com/repos/zhenxiao/presto/hooks","issue_events_url":"https://api.github.com/repos/zhenxiao/presto/issues/events{/number}","events_url":"https://api.github.com/repos/zhenxiao/presto/events","assignees_url":"https://api.github.com/repos/zhenxiao/presto/assignees{/user}","branches_url":"https://api.github.com/repos/zhenxiao/presto/branches{/branch}","tags_url":"https://api.github.com/repos/zhenxiao/presto/tags","blobs_url":"https://api.github.com/repos/zhenxiao/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhenxiao/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhenxiao/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhenxiao/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhenxiao/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/zhenxiao/presto/languages","stargazers_url":"https://api.github.com/repos/zhenxiao/presto/stargazers","contributors_url":"https://api.github.com/repos/zhenxiao/presto/contributors","subscribers_url":"https://api.github.com/repos/zhenxiao/presto/subscribers","subscription_url":"https://api.github.com/repos/zhenxiao/presto/subscription","commits_url":"https://api.github.com/repos/zhenxiao/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhenxiao/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhenxiao/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhenxiao/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhenxiao/presto/contents/{+path}","compare_url":"https://api.github.com/repos/zhenxiao/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhenxiao/presto/merges","archive_url":"https://api.github.com/repos/zhenxiao/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhenxiao/presto/downloads","issues_url":"https://api.github.com/repos/zhenxiao/presto/issues{/number}","pulls_url":"https://api.github.com/repos/zhenxiao/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/zhenxiao/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/zhenxiao/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhenxiao/presto/labels{/name}","releases_url":"https://api.github.com/repos/zhenxiao/presto/releases{/id}","deployments_url":"https://api.github.com/repos/zhenxiao/presto/deployments","created_at":"2014-03-21T01:03:42Z","updated_at":"2016-03-18T00:24:42Z","pushed_at":"2016-03-18T21:25:01Z","git_url":"git://github.com/zhenxiao/presto.git","ssh_url":"git@github.com:zhenxiao/presto.git","clone_url":"https://github.com/zhenxiao/presto.git","svn_url":"https://github.com/zhenxiao/presto","homepage":"http://prestodb.io/","size":53257,"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":"prestodb:master","ref":"master","sha":"19958d490cc18d369813707e28e94e1603b57983","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2016-03-19T01:28:53Z","pushed_at":"2016-03-19T01:21:03Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":112348,"stargazers_count":4575,"watchers_count":4575,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1305,"mirror_url":null,"open_issues_count":540,"forks":1305,"open_issues":540,"watchers":4575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/4823"},"html":{"href":"https://github.com/prestodb/presto/pull/4823"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/4823"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/4823/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/4823/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/4823/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/9c48930c31fe452f55bc91c749c87410411b81a1"}}}}