@Override public BigDecimal getObject(int index) { final BigInteger value = BigInteger.valueOf(((Integer)get(index)).intValue()); return new BigDecimal(value, getField().getScale()); }
/** * 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 int get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
@Override public BigDecimal getObject(int index) { final BigInteger value = BigInteger.valueOf(((Integer)get(index)).intValue()); return new BigDecimal(value, getField().getScale()); }
/** * 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 int get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
public void get(int index, NullableDecimal9Holder holder){ vAccessor.get(index, holder); holder.isSet = bAccessor.get(index); holder.scale = getField().getScale(); holder.precision = getField().getPrecision(); }
public void getFieldById(int fieldId, Decimal9Holder holder){ ((Decimal9Vector) vectors[fieldId]).getAccessor().get(currentIndex, holder); }
public void get(int index, int positionIndex, Decimal9Holder holder) { final int offset = offsets.getAccessor().get(index); assert offset >= 0; assert positionIndex < getInnerValueCountAt(index); values.getAccessor().get(offset + positionIndex, holder); }
public void get(int index, int positionIndex, NullableDecimal9Holder 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 boolean next() { if(index + 1 < repeatedHolder.end) { index++; repeatedHolder.vector.getAccessor().get(repeatedHolder.start + index, holder); return true; } else { return false; } }
public void read(NullableDecimal9Holder h) { vector.getAccessor().get(idx(), h); }
public void read(Decimal9Holder h) { vector.getAccessor().get(idx(), h); }
public void setSafe(int index, RepeatedDecimal9Holder h) { final Decimal9Holder ih = new Decimal9Holder(); final Decimal9Vector.Accessor hVectorAccessor = h.vector.getAccessor(); mutator.startNewValue(index); for(int i = h.start; i < h.end; i++){ hVectorAccessor.get(i, ih); mutator.addSafe(index, ih); } }
public void get(int index, int positionIndex, NullableDecimal9Holder 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); } }
public void add(int index, RepeatedDecimal9Holder holder) { final Decimal9Vector.Accessor accessor = holder.vector.getAccessor(); final Decimal9Holder innerHolder = new Decimal9Holder(); for(int i = holder.start; i < holder.end; i++) { accessor.get(i, innerHolder); add(index, innerHolder); } }
/** * 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 int get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
@Override public boolean next() { if(index + 1 < repeatedHolder.end) { index++; repeatedHolder.vector.getAccessor().get(repeatedHolder.start + index, holder); return true; } else { return false; } }
public void get(int index, NullableDecimal9Holder holder){ vAccessor.get(index, holder); holder.isSet = bAccessor.get(index); holder.scale = getField().getScale(); holder.precision = getField().getPrecision(); }
public void get(int index, int positionIndex, Decimal9Holder holder) { final int offset = offsets.getAccessor().get(index); assert offset >= 0; assert positionIndex < getInnerValueCountAt(index); values.getAccessor().get(offset + positionIndex, holder); }