/** * Get the element at the specified position. * * @param index position of the value * @return value of the element, if not null * @throws IllegalStateException if the value is null */ public byte[] get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
return getIntervalVector().getAccessor().getObject(index); case MinorType.VARBINARY_VALUE: return getVarBinaryVector().getAccessor().getObject(index); case MinorType.VARCHAR_VALUE: return getVarCharVector().getAccessor().getObject(index);
@Override public boolean allocateNewSafe() { /* Boolean to keep track if all the memory allocations were successful * Used in the case of composite vectors when we need to allocate multiple * buffers for multiple vectors. If one of the allocations failed we need to * clear all the memory that we allocated */ boolean success = false; try { success = values.allocateNewSafe() && bits.allocateNewSafe(); } finally { if (!success) { clear(); } } bits.zeroVector(); mutator.reset(); accessor.reset(); return success; }
public Object readObject() { return vector.getAccessor().getObject(idx()); }
public byte[] readByteArray() { return vector.getAccessor().getObject(idx()); }
public boolean isSet() { return !vector.getAccessor().isNull(idx()); }
/** * Get the element at the specified position. * * @param index position of the value * @return value of the element, if not null * @throws IllegalStateException if the value is null */ public byte[] get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
@Override public void allocateNew(int totalBytes, int valueCount) { try { values.allocateNew(totalBytes, valueCount); bits.allocateNew(valueCount); } catch(RuntimeException e) { clear(); throw e; } bits.zeroVector(); mutator.reset(); accessor.reset(); }
public void read(NullableVarBinaryHolder h) { vector.getAccessor().get(idx(), h); }
public void getFieldById(int fieldId, NullableVarBinaryHolder holder){ ((NullableVarBinaryVector) vectors[fieldId]).getAccessor().get(currentIndex, holder); }
@Override public boolean isNull(int index) { return isSet(index) == 0; }
@Override public boolean isNull(int index) { return ac.isNull(index); }
@Override public byte[] getObject(int index) { if (isNull(index)) { return null; } else { return vAccessor.getObject(index); } }
@Override public void reset() { bits.zeroVector(); mutator.reset(); accessor.reset(); super.reset(); }
return getIntervalVector().getAccessor().getObject(index); case MinorType.VARBINARY_VALUE: return getVarBinaryVector().getAccessor().getObject(index); case MinorType.VARCHAR_VALUE: return getVarCharVector().getAccessor().getObject(index);