/** * 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); }
/** * 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); }
public boolean isSet() { return !vector.getAccessor().isNull(idx()); }
@Override public String getString(int index) { if (ac.isNull(index)) { return null; } byte [] b = ac.get(index); return DrillStringUtils.toBinaryString(b); }
@Override public byte[] getBytes(int index) { if (ac.isNull(index)) { return null; } return ac.get(index); }
@Override public InputStream getStream(int index) { if (ac.isNull(index)) { return null; } NullableVarBinaryHolder h = new NullableVarBinaryHolder(); ac.get(index, h); return new ByteBufInputStream(h.buffer.slice(h.start, h.end)); }
@Override public Object getObject(int index) { if (ac.isNull(index)) { return null; } return ac.getObject(index); }
@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); } }
public void copyFrom(int fromIndex, int thisIndex, NullableVarBinaryVector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
public boolean isSet() { return !vector.getAccessor().isNull(idx()); }
public void copyFrom(int fromIndex, int thisIndex, NullableVarBinaryVector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
@Override public byte[] getObject(int index) { if (isNull(index)) { return null; } else { return vAccessor.getObject(index); } }