public void splitAndTransferTo(final int startIndex, final int groups, RepeatedBitVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedUInt2Vector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedTimeStampVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedIntVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedDecimal38DenseVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedDecimal28SparseVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedSmallIntVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedDecimal38SparseVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedVarDecimalVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
@Override public void setValueCount(int valueCount) { // TODO: populate offset end points if (valueCount == 0) { offsets.getMutator().setValueCount(0); } else { for (int i = lastSet; i < valueCount; i++) { offsets.getMutator().setSafe(i + 1, offsets.getAccessor().get(i)); } offsets.getMutator().setValueCount(valueCount + 1); } final int childValueCount = valueCount == 0 ? 0 : offsets.getAccessor().get(valueCount); vector.getMutator().setValueCount(childValueCount); bits.getMutator().setValueCount(valueCount); } }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedIntervalDayVector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void splitAndTransferTo(final int startIndex, final int groups, RepeatedDecimal9Vector to) { final UInt4Vector.Accessor a = offsets.getAccessor(); final UInt4Vector.Mutator m = to.offsets.getMutator(); final int startPos = a.get(startIndex); final int endPos = a.get(startIndex + groups); final int valuesToCopy = endPos - startPos; values.splitAndTransferTo(startPos, valuesToCopy, to.values); to.offsets.clear(); to.offsets.allocateNew(groups + 1); int normalizedPos = 0; for (int i=0; i < groups + 1;i++ ) { normalizedPos = a.get(startIndex+i) - startPos; m.set(i, normalizedPos); } m.setValueCount(groups == 0 ? 0 : groups + 1); }
public void writeUInt4(int value) { mutator.setSafe(idx(), value); vector.getMutator().setValueCount(idx() + 1); }
public void write(NullableUInt4Holder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
@Override public void setValueCount(int valueCount) { assert valueCount >= 0; values.getMutator().setValueCount(valueCount); bits.getMutator().setValueCount(valueCount); } @Override
public void generateTestDataAlt(int size) { setValueCount(size); boolean even = true; final int valueCount = getAccessor().getValueCount(); for(int i = 0; i < valueCount; i++, even = !even) { if(even) { set(i, (int) 1); } else { set(i, (int) 0); } } }
@Override public void setValueCount(int topLevelValueCount) { emptyPopulator.populate(topLevelValueCount); offsets.getMutator().setValueCount(topLevelValueCount == 0 ? 0 : topLevelValueCount + 1); int childValueCount = offsets.getAccessor().get(topLevelValueCount); for (final ValueVector v : getChildren()) { v.getMutator().setValueCount(childValueCount); } }
public void write(UInt4Holder h) { mutator.setSafe(idx(), h); vector.getMutator().setValueCount(idx()+1); }
@Override public void generateTestData(int size) { setValueCount(size); boolean even = true; final int valueCount = getAccessor().getValueCount(); for(int i = 0; i < valueCount; i++, even = !even) { if(even) { set(i, Integer.MIN_VALUE); } else { set(i, Integer.MAX_VALUE); } } }
@Override public void setValueCount(int valueCount) { // TODO: populate offset end points offsets.getMutator().setValueCount(valueCount == 0 ? 0 : valueCount+1); final int childValueCount = valueCount == 0 ? 0 : offsets.getAccessor().get(valueCount); vector.getMutator().setValueCount(childValueCount); }