double value = (double) val; for (int i = start; i < end; i++) { v.getMutator().setSafe(i, value);
@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 void write(Float8Holder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
public void writeNull() { mutator.setNull(idx()); vector.getMutator().setValueCount(idx() + 1); }
@Override public void load(int rowIndex, String value) { try { mutator.set(rowIndex, Double.parseDouble(value)); } catch (NumberFormatException e) { throw UserException .dataReadError(e) .addContext("Failed to parse an FLOAT field") .addContext("Column", getName()) .addContext("Position", getIndex()) .addContext("Value", value) .build(logger); } } }
@Override public void exchange(ValueVector other) { NullableFloat8Vector target = (NullableFloat8Vector) other; bits.exchange(target.bits); values.exchange(target.values); mutator.exchange(other.getMutator()); }
@Override public void writeField(Object value, int outboundIndex) { if (value != null) { vector.getMutator().setSafe(outboundIndex, (Double) value); } }
public void writeFloat8(double value) { mutator.setSafe(idx(), 1, value); vector.getMutator().setValueCount(idx() + 1); }
public void write(NullableFloat8Holder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
@Override protected void readField(long recordsToReadInThisPass) { if (usingDictionary) { for (int i = 0; i < recordsToReadInThisPass; i++){ valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, pageReader.dictionaryValueReader.readDouble()); } } else { for (int i = 0; i < recordsToReadInThisPass; i++){ valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, pageReader.valueReader.readDouble()); } } } }
@Override public void allocateNew(int valueCount) { try { values.allocateNew(valueCount); bits.allocateNew(valueCount); } catch(OutOfMemoryException e) { clear(); throw e; } bits.zeroVector(); mutator.reset(); accessor.reset(); }
public void setSafe(int index, NullableFloat8Holder holder) { setType(index, MinorType.FLOAT8); getFloat8Vector().getMutator().setSafe(index, holder); }
@Override public void reset() { bits.zeroVector(); mutator.reset(); accessor.reset(); super.reset(); }
public void copyFrom(int fromIndex, int thisIndex, NullableFloat8Vector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
@Override public void toNullable(ValueVector nullableVector) { NullableFloat8Vector dest = (NullableFloat8Vector) nullableVector; dest.getMutator().fromNotNullable(this); }
if (pci.kuduColumn.isNullable()) { ((NullableFloat8Vector.Mutator) pci.vv.getMutator()) .setSafe(rowIndex, result.getDouble(pci.index)); } else { ((Float8Vector.Mutator) pci.vv.getMutator())
@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 void write(NullableFloat8Holder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }