{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8496","labels_url":"https://api.github.com/repos/apache/spark/issues/8496/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8496/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8496/events","html_url":"https://github.com/apache/spark/pull/8496","id":103657802,"number":8496,"title":"[SPARK-10065][SQL] avoid the extra copy when generate unsafe array","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T06:41:15Z","updated_at":"2015-08-28T06:50:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8496","html_url":"https://github.com/apache/spark/pull/8496","diff_url":"https://github.com/apache/spark/pull/8496.diff","patch_url":"https://github.com/apache/spark/pull/8496.patch"},"body":"The reason for this extra copy is that we iterate the array twice: calculate elements data size and copy elements to array buffer.\r\n\r\nA simple solution is to follow `createCodeForStruct`, we can dynamically grow the buffer when needed and thus don't need to know the data size ahead."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/135655886","html_url":"https://github.com/apache/spark/pull/8496#issuecomment-135655886","issue_url":"https://api.github.com/repos/apache/spark/issues/8496","id":135655886,"user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T06:50:38Z","updated_at":"2015-08-28T06:50:38Z","body":"cc @davis @viirya "}}