@Override protected OffHeapColumnVector reserveNewColumn(int capacity, DataType type) { return new OffHeapColumnVector(capacity, type); } }
@Override protected OffHeapColumnVector reserveNewColumn(int capacity, DataType type) { return new OffHeapColumnVector(capacity, type); } }
/** * Allocates a column to store elements of `type` on or 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. */ public static ColumnVector allocate(int capacity, DataType type, MemoryMode mode) { if (mode == MemoryMode.OFF_HEAP) { return new OffHeapColumnVector(capacity, type); } else { return new OnHeapColumnVector(capacity, type); } }
/** * 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. */ 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. */ 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 a column to store elements of `type` on or 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. */ public static ColumnVector allocate(int capacity, DataType type, MemoryMode mode) { if (mode == MemoryMode.OFF_HEAP) { return new OffHeapColumnVector(capacity, type); } else { return new OnHeapColumnVector(capacity, type); } }