{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8189","labels_url":"https://api.github.com/repos/apache/spark/issues/8189/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8189/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8189/events","html_url":"https://github.com/apache/spark/pull/8189","id":100943828,"number":8189,"title":"[SPARK-9973][SQL]correct buffer size","user":{"login":"viper-kun","id":6460155,"avatar_url":"https://avatars.githubusercontent.com/u/6460155?v=3","gravatar_id":"","url":"https://api.github.com/users/viper-kun","html_url":"https://github.com/viper-kun","followers_url":"https://api.github.com/users/viper-kun/followers","following_url":"https://api.github.com/users/viper-kun/following{/other_user}","gists_url":"https://api.github.com/users/viper-kun/gists{/gist_id}","starred_url":"https://api.github.com/users/viper-kun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viper-kun/subscriptions","organizations_url":"https://api.github.com/users/viper-kun/orgs","repos_url":"https://api.github.com/users/viper-kun/repos","events_url":"https://api.github.com/users/viper-kun/events{/privacy}","received_events_url":"https://api.github.com/users/viper-kun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-14T06:20:34Z","updated_at":"2015-08-15T22:26:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8189","html_url":"https://github.com/apache/spark/pull/8189","diff_url":"https://github.com/apache/spark/pull/8189.diff","patch_url":"https://github.com/apache/spark/pull/8189.patch"},"body":"When cache table in memory in spark sql, we allocate too more memory.\r\n\r\nInMemoryColumnarTableScan.class\r\n  val initialBufferSize = columnType.defaultSize * batchSize\r\n  ColumnBuilder(attribute.dataType, initialBufferSize, attribute.name, useCompression)\r\n\r\nBasicColumnBuilder.class\r\n  buffer = ByteBuffer.allocate(4 + size * columnType.defaultSize)\r\n\r\nSo total allocate size is (4+ size * columnType.defaultSize  * columnType.defaultSize), We should change it to 4+ size * columnType.defaultSize."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/131456755","html_url":"https://github.com/apache/spark/pull/8189#issuecomment-131456755","issue_url":"https://api.github.com/repos/apache/spark/issues/8189","id":131456755,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T22:26:48Z","updated_at":"2015-08-15T22:26:48Z","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/40973/\nTest PASSed."}}