@Override public int getValueCapacity() { return vector.getValueCapacity(); }
@Override public int getValueCapacity(){ return Math.max(offsetVector.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity() { return Math.max(offsets.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity(){ return Math.max(offsetVector.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity(){ return Math.max(offsetVector.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity(){ return Math.max(offsetVector.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity() { final int offsetValueCapacity = Math.max(offsets.getValueCapacity() - 1, 0); if (vector == DEFAULT_DATA_VECTOR) { return offsetValueCapacity; } return Math.min(vector.getValueCapacity(), offsetValueCapacity); }
@Override public int getValueCapacity(){ return Math.min(bits.getValueCapacity(), values.getValueCapacity()); }
public void flush() { int numElements = buffer.position() / UInt4Vector.VALUE_WIDTH; if (numElements == 0) { return; // NOOP } while((currentIdx + numElements -1) >= parent.getValueCapacity()) { parent.reAlloc(); } parent.data.setBytes(currentIdx * UInt4Vector.VALUE_WIDTH, buffer.array(), 0, buffer.position()); // Update the start index currentIdx += numElements; // Reset the byte buffer buffer.clear(); } }
@Override public void setValueCount(int valueCount) { final int currentValueCapacity = getValueCapacity(); final int idx = (VALUE_WIDTH * valueCount); while(valueCount > getValueCapacity()) { reAlloc(); } if (valueCount > 0 && currentValueCapacity > valueCount * 2) { incrementAllocationMonitor(); } else if (allocationMonitor > 0) { allocationMonitor = 0; } VectorTrimmer.trim(data, idx); data.writerIndex(valueCount * VALUE_WIDTH); } }
/** * Set the value of a required or nullable vector. Grows the vector as needed. * Does not enforce size limits; scalar fixed-width types can never overflow * a vector. * @param index item to write */ public void setSafe(int index, int value) { while(index >= getValueCapacity()) { reAlloc(); } set(index, value); }
public void setSafe(int index, UInt4Holder holder) { while(index >= getValueCapacity()) { reAlloc(); } set(index, holder); }
public void setSafe(int index, NullableUInt4Holder holder) { while(index >= getValueCapacity()) { reAlloc(); } set(index, holder); }
public void copyFromSafe(int fromIndex, int thisIndex, UInt4Vector from) { while(thisIndex >= getValueCapacity()) { reAlloc(); } copyFrom(fromIndex, thisIndex, from); }
@Override public void startNewValue(int index) { while (offsets.getValueCapacity() <= index) { offsets.reAlloc(); } offsets.getMutator().setSafe(index+1, offsets.getAccessor().get(index)); setValueCount(index+1); }
@Override public int getValueCapacity(){ return Math.max(offsetVector.getValueCapacity() - 1, 0); }
@Override public int getValueCapacity() { final int offsetValueCapacity = Math.max(offsets.getValueCapacity() - 1, 0); if (vector == DEFAULT_DATA_VECTOR) { return offsetValueCapacity; } return Math.min(vector.getValueCapacity(), offsetValueCapacity); }
public void copyFromSafe(int fromIndex, int thisIndex, UInt4Vector from) { while(thisIndex >= getValueCapacity()) { reAlloc(); } copyFrom(fromIndex, thisIndex, from); }
/** * Set the value of a required or nullable vector. Grows the vector as needed. * Does not enforce size limits; scalar fixed-width types can never overflow * a vector. * @param index item to write */ public void setSafe(int index, int value) { while(index >= getValueCapacity()) { reAlloc(); } set(index, value); }
@Override public void startNewValue(int index) { while (offsets.getValueCapacity() <= index) { offsets.reAlloc(); } offsets.getMutator().setSafe(index+1, offsets.getAccessor().get(index)); setValueCount(index+1); }