@Override public List<BigDecimal> getObject(int index) { final List<BigDecimal> vals = new JsonStringArrayList<>(); final UInt4Vector.Accessor offsetsAccessor = offsets.getAccessor(); final int start = offsetsAccessor.get(index); final int end = offsetsAccessor.get(index + 1); final Decimal38SparseVector.Accessor valuesAccessor = values.getAccessor(); for(int i = start; i < end; i++) { vals.add(valuesAccessor.getObject(i)); } return vals; }
@Override public List<BigDecimal> getObject(int index) { final List<BigDecimal> vals = new JsonStringArrayList<>(); final UInt4Vector.Accessor offsetsAccessor = offsets.getAccessor(); final int start = offsetsAccessor.get(index); final int end = offsetsAccessor.get(index + 1); final Decimal18Vector.Accessor valuesAccessor = values.getAccessor(); for(int i = start; i < end; i++) { vals.add(valuesAccessor.getObject(i)); } return vals; }
@Override public List<Long> getObject(int index) { final List<Long> vals = new JsonStringArrayList<>(); final UInt4Vector.Accessor offsetsAccessor = offsets.getAccessor(); final int start = offsetsAccessor.get(index); final int end = offsetsAccessor.get(index + 1); final BigIntVector.Accessor valuesAccessor = values.getAccessor(); for(int i = start; i < end; i++) { vals.add(valuesAccessor.getObject(i)); } return vals; }
public void addSafe(int index, NullableDecimal38DenseHolder holder) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().setSafe(nextOffset, holder); offsets.getMutator().setSafe(index+1, nextOffset+1); }
/** * Get a value for the given record. Each element in the repeated field is accessed by * the positionIndex param. * * @param index record containing the repeated field * @param positionIndex position within the repeated field * @return element at the given position in the given record */ public long get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
protected void add(int index, Decimal18Holder holder) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().set(nextOffset, holder); offsets.getMutator().set(index+1, nextOffset+1); }
public void addSafe(int index, long srcValue) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().setSafe(nextOffset, srcValue); offsets.getMutator().setSafe(index+1, nextOffset+1); }
/** * Get a value for the given record. Each element in the repeated field is accessed by * the positionIndex param. * * @param index record containing the repeated field * @param positionIndex position within the repeated field * @return element at the given position in the given record */ public long get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
protected void add(int index, Decimal28DenseHolder holder) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().set(nextOffset, holder); offsets.getMutator().set(index+1, nextOffset+1); }
public void addSafe(int index, Decimal28DenseHolder holder) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().setSafe(nextOffset, holder); offsets.getMutator().setSafe(index+1, nextOffset+1); }
/** * Add an element to the given record index. This is similar to the set() method in other * value vectors, except that it permits setting multiple values for a single record. * * @param index record of the element to add * @param value value to add to the given row */ public void add(int index, DrillBuf value) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().set(nextOffset, value); offsets.getMutator().set(index+1, nextOffset+1); }
/** * Get a value for the given record. Each element in the repeated field is accessed by * the positionIndex param. * * @param index record containing the repeated field * @param positionIndex position within the repeated field * @return element at the given position in the given record */ public DrillBuf get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
protected void add(int index, Decimal28SparseHolder holder) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().set(nextOffset, holder); offsets.getMutator().set(index+1, nextOffset+1); }
public void get(int index, int positionIndex, NullableDecimal28SparseHolder holder) { final int offset = offsets.getAccessor().get(index); assert offset >= 0; if (positionIndex >= getInnerValueCountAt(index)) { holder.isSet = 0; return; } values.getAccessor().get(offset + positionIndex, holder); } }
@Override public List<BigDecimal> getObject(int index) { final List<BigDecimal> vals = new JsonStringArrayList<>(); final UInt4Vector.Accessor offsetsAccessor = offsets.getAccessor(); final int start = offsetsAccessor.get(index); final int end = offsetsAccessor.get(index + 1); final Decimal28SparseVector.Accessor valuesAccessor = values.getAccessor(); for(int i = start; i < end; i++) { vals.add(valuesAccessor.getObject(i)); } return vals; }
/** * Add an element to the given record index. This is similar to the set() method in other * value vectors, except that it permits setting multiple values for a single record. * * @param index record of the element to add * @param value value to add to the given row */ public void add(int index, int value) { final int nextOffset = offsets.getAccessor().get(index+1); values.getMutator().set(nextOffset, value); offsets.getMutator().set(index+1, nextOffset+1); }