long value = (long) 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(NullableBigIntHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
public void setSafe(int index, NullableBigIntHolder holder) { setType(index, MinorType.BIGINT); getBigIntVector().getMutator().setSafe(index, holder); }
public void writeNull() { mutator.setNull(idx()); vector.getMutator().setValueCount(idx() + 1); }
static void setNullableLongColumnValue(final long data, final ValueVector vv, final int count) { ((NullableBigIntVector.Mutator) vv.getMutator()) .setSafe(count, data); }
@Override public void load(int rowIndex, String value) { try { mutator.set(rowIndex, Long.parseLong(value)); } catch (NumberFormatException e) { throw UserException .dataReadError(e) .addContext("Failed to parse an INT field") .addContext("Column", getName()) .addContext("Position", getIndex()) .addContext("Value", value) .build(logger); } } }
public void writeBigInt(long value) { mutator.setSafe(idx(), 1, value); vector.getMutator().setValueCount(idx() + 1); }
private void setLongColumnValue(long data, ProjectedColumnInfo pci, final int count) { ((NullableBigIntVector.Mutator) pci.vv.getMutator()) .setSafe(count, data); }
@Override protected void readField(long recordsToReadInThisPass) { if (usingDictionary) { for (int i = 0; i < recordsToReadInThisPass; i++){ valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, pageReader.dictionaryValueReader.readLong()); } } else { for (int i = 0; i < recordsToReadInThisPass; i++){ valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, pageReader.valueReader.readLong()); } } } }
@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 write(BigIntHolder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
@Override public void writeField(Object value, int outboundIndex) { if (value != null) { vector.getMutator().setSafe(outboundIndex, (Long) value); } }
@Override public void toNullable(ValueVector nullableVector) { NullableBigIntVector dest = (NullableBigIntVector) nullableVector; dest.getMutator().fromNotNullable(this); }
@Override public void exchange(ValueVector other) { NullableBigIntVector target = (NullableBigIntVector) other; bits.exchange(target.bits); values.exchange(target.values); mutator.exchange(other.getMutator()); }
public void copyFrom(int fromIndex, int thisIndex, NullableBigIntVector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
@Override public void reset() { bits.zeroVector(); mutator.reset(); accessor.reset(); super.reset(); }
if (pci.kuduColumn.isNullable()) { ((NullableBigIntVector.Mutator) pci.vv.getMutator()) .setSafe(rowIndex, result.getLong(pci.index)); } else { ((BigIntVector.Mutator) pci.vv.getMutator())