public GenericCopier(FieldVector[] source, FieldVector dst){ this.transfer = new TransferPair[source.length]; for(int i =0; i < source.length; i++){ this.transfer[i] = source[i].makeTransferPair(dst); } this.dst = dst; }
GenericCopier(FieldVector source, int fieldId, FieldVector[] targets, Stopwatch copyWatch) { super(targets, fieldId, 0); // bufferOrdinal doesn't matter here final int numTargets = targets.length; this.transfers = new TransferPair[numTargets]; for (int i = 0; i < numTargets; i++) { transfers[i] = source.makeTransferPair(targets[i]); } this.copyWatch = copyWatch; }
public GenericCopier(FieldVector[] source, FieldVector dst){ this.transfer = new TransferPair[source.length]; for(int i =0; i < source.length; i++){ this.transfer[i] = source[i].makeTransferPair(dst); } this.dst = dst; }
public GenericCopier(FieldVector[] source, FieldVector dst){ this.transfer = new TransferPair[source.length]; for(int i =0; i < source.length; i++){ this.transfer[i] = source[i].makeTransferPair(dst); } this.dst = dst; }
public GenericCopier(FieldVector source, FieldVector dst){ this.transfer = source.makeTransferPair(dst); this.dst = dst; }
public TransferImpl(FixedSizeListVector to) { this.to = to; to.addOrGetVector(vector.getField().getFieldType()); dataPair = vector.makeTransferPair(to.vector); }
public FieldVector addVector(FieldVector v) { String name = v.getMinorType().name().toLowerCase(); Preconditions.checkState(internalStruct.getChild(name) == null, String.format("%s vector already exists", name)); final FieldVector newVector = internalStruct.addOrGet(name, v.getField().getFieldType(), v.getClass()); v.makeTransferPair(newVector).transfer(); internalStruct.putChild(name, newVector); if (callBack != null) { callBack.doWork(); } return newVector; }
TransferPair tp = vector.makeTransferPair(output); ((FixedWidthVector) vector).allocateNew(LBlockHashTableNoSpill.MAX_VALUES_PER_BATCH);
public void output(final int batchIndex) { final FieldVector accumulationVector = accumulators[batchIndex]; final TransferPair transferPair= accumulationVector.makeTransferPair(transferVector); transferPair.transfer(); if (batchIndex == 0) {
protected StructTransferPair(NonNullableStructVector from, NonNullableStructVector to, boolean allocate) { this.from = from; this.to = to; this.pairs = new TransferPair[from.size()]; this.to.ephPair = null; int i = 0; FieldVector vector; for (String child : from.getChildFieldNames()) { int preSize = to.size(); vector = from.getChild(child); if (vector == null) { continue; } //DRILL-1872: we add the child fields for the vector, looking up the field by name. For a map vector, // the child fields may be nested fields of the top level child. For example if the structure // of a child field is oa.oab.oabc then we add oa, then add oab to oa then oabc to oab. // But the children member of a Materialized field is a HashSet. If the fields are added in the // children HashSet, and the hashCode of the Materialized field includes the hash code of the // children, the hashCode value of oa changes *after* the field has been added to the HashSet. // (This is similar to what happens in ScanBatch where the children cannot be added till they are // read). To take care of this, we ensure that the hashCode of the MaterializedField does not // include the hashCode of the children but is based only on MaterializedField$key. final FieldVector newVector = to.addOrGet(child, vector.getField().getFieldType(), vector.getClass()); if (allocate && to.size() != preSize) { newVector.allocateNew(); } pairs[i++] = vector.makeTransferPair(newVector); } }
public TransferImpl(ListVector to) { this.to = to; to.addOrGetVector(vector.getField().getFieldType()); if (to.getDataVector() instanceof ZeroVector) { to.addOrGetVector(vector.getField().getFieldType()); } dataTransferPair = getDataVector().makeTransferPair(to.getDataVector()); }