{"action":"created","comment":{"url":"https://api.github.com/repos/gengliangwang/spark/pulls/comments/244236355","pull_request_review_id":188189388,"id":244236355,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDIzNjM1NQ==","diff_hunk":"@@ -0,0 +1,91 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  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+\n+package org.apache.spark.sql.execution.datasources.orc\n+\n+import org.apache.orc.TypeDescription\n+\n+import org.apache.spark.sql.QueryTest\n+import org.apache.spark.sql.catalyst.InternalRow\n+import org.apache.spark.sql.execution.vectorized.{OnHeapColumnVector, WritableColumnVector}\n+import org.apache.spark.sql.test.{SharedSQLContext, SQLTestUtils}\n+import org.apache.spark.sql.types.StructType\n+import org.apache.spark.unsafe.types.UTF8String.fromString\n+\n+class OrcColumnarBatchReaderSuite extends QueryTest with SQLTestUtils with SharedSQLContext {\n+\n+  private val orcFileSchema = TypeDescription.fromString(s\"struct<col1:int,col2:int>\")\n+  private val requiredSchema = StructType.fromDDL(\"col1 int, col3 int\")\n+  private val partitionSchema = StructType.fromDDL(\"partCol1 string, partCol2 string\")\n+  private val partitionValues = InternalRow(fromString(\"partValue1\"), fromString(\"partValue2\"))\n+  private val resultSchema = StructType(requiredSchema.fields ++ partitionSchema.fields)\n+\n+  private val isConstant = classOf[WritableColumnVector].getDeclaredField(\"isConstant\")\n+  isConstant.setAccessible(true)","path":"sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcColumnarBatchReaderSuite.scala","position":38,"original_position":38,"commit_id":"a3a5741b1b04272f2ce5e395327402b4c17f3013","original_commit_id":"a3a5741b1b04272f2ce5e395327402b4c17f3013","user":{"login":"dongjoon-hyun","id":9700541,"node_id":"MDQ6VXNlcjk3MDA1NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9700541?v=4","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"body":"@cloud-fan and @gengliangwang \r\nTo avoid changing the visibility of `WritableColumnVector.isConstant`, I use reflection here. I guess this is okay for testing. For `OrcColumnarBatchReader`, I changed the visibility two fields with `VisibleForTesting` annotation.","created_at":"2018-12-27T22:42:34Z","updated_at":"2018-12-27T22:42:34Z","html_url":"https://github.com/gengliangwang/spark/pull/3#discussion_r244236355","pull_request_url":"https://api.github.com/repos/gengliangwang/spark/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/comments/244236355"},"html":{"href":"https://github.com/gengliangwang/spark/pull/3#discussion_r244236355"},"pull_request":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/gengliangwang/spark/pulls/3","id":241234221,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMjM0MjIx","html_url":"https://github.com/gengliangwang/spark/pull/3","diff_url":"https://github.com/gengliangwang/spark/pull/3.diff","patch_url":"https://github.com/gengliangwang/spark/pull/3.patch","issue_url":"https://api.github.com/repos/gengliangwang/spark/issues/3","number":3,"state":"open","locked":false,"title":"Add `OrcColumnarBatchReaderSuite`","user":{"login":"dongjoon-hyun","id":9700541,"node_id":"MDQ6VXNlcjk3MDA1NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9700541?v=4","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-27T22:37:23Z","updated_at":"2018-12-27T22:42:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"144abb66b686502a8500fea581b2e558b4201755","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gengliangwang/spark/pulls/3/commits","review_comments_url":"https://api.github.com/repos/gengliangwang/spark/pulls/3/comments","review_comment_url":"https://api.github.com/repos/gengliangwang/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gengliangwang/spark/issues/3/comments","statuses_url":"https://api.github.com/repos/gengliangwang/spark/statuses/a3a5741b1b04272f2ce5e395327402b4c17f3013","head":{"label":"dongjoon-hyun:PR-23387","ref":"PR-23387","sha":"a3a5741b1b04272f2ce5e395327402b4c17f3013","user":{"login":"dongjoon-hyun","id":9700541,"node_id":"MDQ6VXNlcjk3MDA1NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9700541?v=4","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"repo":{"id":28900400,"node_id":"MDEwOlJlcG9zaXRvcnkyODkwMDQwMA==","name":"spark","full_name":"dongjoon-hyun/spark","private":false,"owner":{"login":"dongjoon-hyun","id":9700541,"node_id":"MDQ6VXNlcjk3MDA1NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9700541?v=4","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dongjoon-hyun/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/dongjoon-hyun/spark","forks_url":"https://api.github.com/repos/dongjoon-hyun/spark/forks","keys_url":"https://api.github.com/repos/dongjoon-hyun/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dongjoon-hyun/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dongjoon-hyun/spark/teams","hooks_url":"https://api.github.com/repos/dongjoon-hyun/spark/hooks","issue_events_url":"https://api.github.com/repos/dongjoon-hyun/spark/issues/events{/number}","events_url":"https://api.github.com/repos/dongjoon-hyun/spark/events","assignees_url":"https://api.github.com/repos/dongjoon-hyun/spark/assignees{/user}","branches_url":"https://api.github.com/repos/dongjoon-hyun/spark/branches{/branch}","tags_url":"https://api.github.com/repos/dongjoon-hyun/spark/tags","blobs_url":"https://api.github.com/repos/dongjoon-hyun/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dongjoon-hyun/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dongjoon-hyun/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/dongjoon-hyun/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dongjoon-hyun/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/dongjoon-hyun/spark/languages","stargazers_url":"https://api.github.com/repos/dongjoon-hyun/spark/stargazers","contributors_url":"https://api.github.com/repos/dongjoon-hyun/spark/contributors","subscribers_url":"https://api.github.com/repos/dongjoon-hyun/spark/subscribers","subscription_url":"https://api.github.com/repos/dongjoon-hyun/spark/subscription","commits_url":"https://api.github.com/repos/dongjoon-hyun/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/dongjoon-hyun/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/dongjoon-hyun/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/dongjoon-hyun/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/dongjoon-hyun/spark/contents/{+path}","compare_url":"https://api.github.com/repos/dongjoon-hyun/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dongjoon-hyun/spark/merges","archive_url":"https://api.github.com/repos/dongjoon-hyun/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dongjoon-hyun/spark/downloads","issues_url":"https://api.github.com/repos/dongjoon-hyun/spark/issues{/number}","pulls_url":"https://api.github.com/repos/dongjoon-hyun/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/dongjoon-hyun/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/dongjoon-hyun/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dongjoon-hyun/spark/labels{/name}","releases_url":"https://api.github.com/repos/dongjoon-hyun/spark/releases{/id}","deployments_url":"https://api.github.com/repos/dongjoon-hyun/spark/deployments","created_at":"2015-01-07T05:46:34Z","updated_at":"2018-12-27T16:30:13Z","pushed_at":"2018-12-27T22:35:52Z","git_url":"git://github.com/dongjoon-hyun/spark.git","ssh_url":"git@github.com:dongjoon-hyun/spark.git","clone_url":"https://github.com/dongjoon-hyun/spark.git","svn_url":"https://github.com/dongjoon-hyun/spark","homepage":null,"size":282655,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"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","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"gengliangwang:refactorOrcColumnarBatch","ref":"refactorOrcColumnarBatch","sha":"49ae28b1e29570675cfecc019d18428553d336b5","user":{"login":"gengliangwang","id":1097932,"node_id":"MDQ6VXNlcjEwOTc5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1097932?v=4","gravatar_id":"","url":"https://api.github.com/users/gengliangwang","html_url":"https://github.com/gengliangwang","followers_url":"https://api.github.com/users/gengliangwang/followers","following_url":"https://api.github.com/users/gengliangwang/following{/other_user}","gists_url":"https://api.github.com/users/gengliangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/gengliangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengliangwang/subscriptions","organizations_url":"https://api.github.com/users/gengliangwang/orgs","repos_url":"https://api.github.com/users/gengliangwang/repos","events_url":"https://api.github.com/users/gengliangwang/events{/privacy}","received_events_url":"https://api.github.com/users/gengliangwang/received_events","type":"User","site_admin":false},"repo":{"id":95047635,"node_id":"MDEwOlJlcG9zaXRvcnk5NTA0NzYzNQ==","name":"spark","full_name":"gengliangwang/spark","private":false,"owner":{"login":"gengliangwang","id":1097932,"node_id":"MDQ6VXNlcjEwOTc5MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1097932?v=4","gravatar_id":"","url":"https://api.github.com/users/gengliangwang","html_url":"https://github.com/gengliangwang","followers_url":"https://api.github.com/users/gengliangwang/followers","following_url":"https://api.github.com/users/gengliangwang/following{/other_user}","gists_url":"https://api.github.com/users/gengliangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/gengliangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengliangwang/subscriptions","organizations_url":"https://api.github.com/users/gengliangwang/orgs","repos_url":"https://api.github.com/users/gengliangwang/repos","events_url":"https://api.github.com/users/gengliangwang/events{/privacy}","received_events_url":"https://api.github.com/users/gengliangwang/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gengliangwang/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/gengliangwang/spark","forks_url":"https://api.github.com/repos/gengliangwang/spark/forks","keys_url":"https://api.github.com/repos/gengliangwang/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gengliangwang/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gengliangwang/spark/teams","hooks_url":"https://api.github.com/repos/gengliangwang/spark/hooks","issue_events_url":"https://api.github.com/repos/gengliangwang/spark/issues/events{/number}","events_url":"https://api.github.com/repos/gengliangwang/spark/events","assignees_url":"https://api.github.com/repos/gengliangwang/spark/assignees{/user}","branches_url":"https://api.github.com/repos/gengliangwang/spark/branches{/branch}","tags_url":"https://api.github.com/repos/gengliangwang/spark/tags","blobs_url":"https://api.github.com/repos/gengliangwang/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gengliangwang/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gengliangwang/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/gengliangwang/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gengliangwang/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/gengliangwang/spark/languages","stargazers_url":"https://api.github.com/repos/gengliangwang/spark/stargazers","contributors_url":"https://api.github.com/repos/gengliangwang/spark/contributors","subscribers_url":"https://api.github.com/repos/gengliangwang/spark/subscribers","subscription_url":"https://api.github.com/repos/gengliangwang/spark/subscription","commits_url":"https://api.github.com/repos/gengliangwang/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/gengliangwang/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/gengliangwang/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/gengliangwang/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/gengliangwang/spark/contents/{+path}","compare_url":"https://api.github.com/repos/gengliangwang/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gengliangwang/spark/merges","archive_url":"https://api.github.com/repos/gengliangwang/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gengliangwang/spark/downloads","issues_url":"https://api.github.com/repos/gengliangwang/spark/issues{/number}","pulls_url":"https://api.github.com/repos/gengliangwang/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/gengliangwang/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/gengliangwang/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gengliangwang/spark/labels{/name}","releases_url":"https://api.github.com/repos/gengliangwang/spark/releases{/id}","deployments_url":"https://api.github.com/repos/gengliangwang/spark/deployments","created_at":"2017-06-21T21:26:20Z","updated_at":"2018-09-06T08:35:28Z","pushed_at":"2018-12-27T22:37:23Z","git_url":"git://github.com/gengliangwang/spark.git","ssh_url":"git@github.com:gengliangwang/spark.git","clone_url":"https://github.com/gengliangwang/spark.git","svn_url":"https://github.com/gengliangwang/spark","homepage":null,"size":289053,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/3"},"html":{"href":"https://github.com/gengliangwang/spark/pull/3"},"issue":{"href":"https://api.github.com/repos/gengliangwang/spark/issues/3"},"comments":{"href":"https://api.github.com/repos/gengliangwang/spark/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gengliangwang/spark/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/gengliangwang/spark/statuses/a3a5741b1b04272f2ce5e395327402b4c17f3013"}},"author_association":"NONE"}}
{"actor":{"display_login":"dongjoon-hyun"}}