spark-instrumented-optimizer/sql/catalyst
Wenchen Fan 4f1daa1ef6 [SPARK-10065] [SQL] avoid the extra copy when generate unsafe array
The reason for this extra copy is that we iterate the array twice: calculate elements data size and copy elements to array buffer.

A 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.

This PR also include some typo and style fixes, and did some minor refactor to make sure `input.primitive` is always variable name not code when generate unsafe code.

Author: Wenchen Fan <cloud0fan@outlook.com>

Closes #8496 from cloud-fan/avoid-copy.
2015-09-10 10:04:38 -07:00
..
src [SPARK-10065] [SQL] avoid the extra copy when generate unsafe array 2015-09-10 10:04:38 -07:00
pom.xml [SPARK-8064] [SQL] Build against Hive 1.2.1 2015-08-03 15:24:42 -07:00