java.lang.Object
org.apache.arrow.vector.AllocationHelper
Helper utility methods for allocating storage for Vectors.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidallocate(ValueVector v, int valueCount, int bytesPerValue) Allocates the vector.static voidallocate(ValueVector v, int valueCount, int bytesPerValue, int repeatedPerTop) Allocates memory for a vector assuming given number of values and their width.static voidallocateNew(ValueVector v, int valueCount) Allocates the exact amount if v is fixed width, otherwise falls back to dynamic allocation.static voidallocatePrecomputedChildCount(ValueVector v, int valueCount, int bytesPerValue, int childValCount) Allocates memory for a vector assuming given number of values and their width.
- 
Method Details- 
allocateAllocates the vector.- Parameters:
- v- The vector to allocate.
- valueCount- Number of values to allocate.
- bytesPerValue- bytes per value.
- Throws:
- OutOfMemoryException- if it can't allocate the memory.
 
- 
allocatePrecomputedChildCountpublic static void allocatePrecomputedChildCount(ValueVector v, int valueCount, int bytesPerValue, int childValCount) Allocates memory for a vector assuming given number of values and their width.- Parameters:
- v- The vector the allocate.
- valueCount- The number of elements to allocate.
- bytesPerValue- The bytes per value to use for allocating underlying storage
- childValCount- If- vis a repeated vector, this is number of child elements to allocate.
- Throws:
- OutOfMemoryException- if it can't allocate the memory.
 
- 
allocateAllocates memory for a vector assuming given number of values and their width.- Parameters:
- v- The vector the allocate.
- valueCount- The number of elements to allocate.
- bytesPerValue- The bytes per value to use for allocating underlying storage
- repeatedPerTop- If- vis a repeated vector, this is assumed number of elements per child.
- Throws:
- OutOfMemoryException- if it can't allocate the memory
 
- 
allocateNewAllocates the exact amount if v is fixed width, otherwise falls back to dynamic allocation.- Parameters:
- v- value vector we are trying to allocate
- valueCount- size we are trying to allocate
- Throws:
- OutOfMemoryException- if it can't allocate the memory
 
 
-