{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13758","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13758/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13758/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13758/events","html_url":"https://github.com/apache/spark/pull/13758","id":161010843,"number":13758,"title":"[SPARK-16043][SQL] Prepare GenericArrayData implementation specialized for a primitive array","user":{"login":"kiszk","id":1315079,"avatar_url":"https://avatars.githubusercontent.com/u/1315079?v=3","gravatar_id":"","url":"https://api.github.com/users/kiszk","html_url":"https://github.com/kiszk","followers_url":"https://api.github.com/users/kiszk/followers","following_url":"https://api.github.com/users/kiszk/following{/other_user}","gists_url":"https://api.github.com/users/kiszk/gists{/gist_id}","starred_url":"https://api.github.com/users/kiszk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiszk/subscriptions","organizations_url":"https://api.github.com/users/kiszk/orgs","repos_url":"https://api.github.com/users/kiszk/repos","events_url":"https://api.github.com/users/kiszk/events{/privacy}","received_events_url":"https://api.github.com/users/kiszk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-18T06:56:25Z","updated_at":"2016-06-18T06:59:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13758","html_url":"https://github.com/apache/spark/pull/13758","diff_url":"https://github.com/apache/spark/pull/13758.diff","patch_url":"https://github.com/apache/spark/pull/13758.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR addresses a ToDo of ```GenericArrayData``` class. Current implementation of ```GenericArrayData``` leads to boxing/unboxing if type of array elements are primitive. It would be good to eliminate boxing/unboxing from the view of runtime memory footprint and performance.\r\n\r\nThis PR eliminattes boxing/unboxing by preparing sub classes of ```GenericArrayData``` to specialize operations in these classes. This PR prepare a new method ```GenericArrayData.allocate(...) ``` that can return generic ```GenericArrayData``` instance or a ```Generic<Type>ArrayData``` instance specialized for ```<Type>``` type array.\r\n\r\nHere are major improvements:\r\n1. Hold an array in a primitive array (previously ```Object[]``` is used and boxing happened in a constructor)\r\n2. a method \"get```<Type>```()\" gets a value from an primitive array (previously unboxing happened)\r\n3. a method \"to```<Type>```Array\" performs data copy using ```System.arraycopy``` (previously unboxing happened)\r\n\r\n## How was this patch tested?\r\n\r\n(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)\r\n\r\nadd unit tests"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/226926220","html_url":"https://github.com/apache/spark/pull/13758#issuecomment-226926220","issue_url":"https://api.github.com/repos/apache/spark/issues/13758","id":226926220,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T06:59:33Z","updated_at":"2016-06-18T06:59:33Z","body":"**[Test build #60768 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60768/consoleFull)** for PR 13758 at commit [`17bdfcf`](https://github.com/apache/spark/commit/17bdfcf7b9c155fe05eb75f73d661c2863cdf2d9).\n * This patch **fails Scala style tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}