public static OffHeapColumnVector [ ] allocateColumns ( int capacity , StructField [ ] fields ) { OffHeapColumnVector [ ] vectors = new OffHeapColumnVector [ fields . length ] ; for ( int i = 0 ; i < fields . length ; i ++ ) { vectors [ i ] = new OffHeapColumnVector ( capacity , fields [ i ] . dataType ( ) ) ; } return vectors ; }
Allocates columns to store elements of each field off heap . Capacity is the initial capacity of the vector and it will grow as necessary . Capacity is in number of elements not number of bytes .