/** * Do the per-batch setup for an inner join. */ protected void innerPerBatchSetup(VectorizedRowBatch batch) { // For join operators that can generate small table results, reset their // (target) scratch columns. for (int column : smallTableValueColumnMap) { ColumnVector smallTableColumn = batch.cols[column]; smallTableColumn.reset(); } }
/** * Reset the vector for the next batch. */ @Override public void reset() { super.reset(); childCount = 0; }
/** * Do the per-batch setup for an outer join. */ protected void outerPerBatchSetup(VectorizedRowBatch batch) { // For join operators that can generate small table results, reset their // (target) scratch columns. for (int column : outerSmallTableKeyColumnMap) { ColumnVector bigTableOuterKeyColumn = batch.cols[column]; bigTableOuterKeyColumn.reset(); } for (int column : smallTableValueColumnMap) { ColumnVector smallTableColumn = batch.cols[column]; smallTableColumn.reset(); } }
/** * Do the per-batch setup for an inner join. */ protected void innerPerBatchSetup(VectorizedRowBatch batch) { // For join operators that can generate small table results, reset their // (target) scratch columns. for (int column : smallTableOutputVectorColumns) { ColumnVector smallTableColumn = batch.cols[column]; smallTableColumn.reset(); } }
/** * Do the per-batch setup for an outer join. */ protected void outerPerBatchSetup(VectorizedRowBatch batch) { // For join operators that can generate small table results, reset their // (target) scratch columns. for (int column : smallTableOutputVectorColumns) { ColumnVector smallTableColumn = batch.cols[column]; smallTableColumn.reset(); } for (int column : bigTableOuterKeyOutputVectorColumns) { ColumnVector bigTableOuterKeyColumn = batch.cols[column]; bigTableOuterKeyColumn.reset(); } }
/** * Additional reset work for BytesColumnVector (releasing scratch bytes for by value strings). */ @Override public void reset() { super.reset(); initBuffer(0); }
@Override public void reset() { super.reset(); child.reset(); }
/** * Resets the row batch to default state * - sets selectedInUse to false * - sets size to 0 * - sets endOfFile to false * - resets each column * - inits each column */ public void reset() { selectedInUse = false; size = 0; endOfFile = false; for (ColumnVector vc : cols) { if (vc != null) { vc.reset(); vc.init(); } } }
/** * Copy part of a batch into the destination batch. * @param destination the batch to copy into * @param source the batch to copy from * @param sourceStart the row number to start from in the source * @return the number of rows copied */ void copyIntoBatch(VectorizedRowBatch destination, VectorizedRowBatch source, int sourceStart) { int rows = Math.min(source.size - sourceStart, destination.getMaxSize()); for(int c=0; c < source.cols.length; ++c) { destination.cols[c].reset(); copyColumn(destination.cols[c], source.cols[c], sourceStart, rows); } destination.size = rows; } }
/** * Copy part of a batch into the destination batch. * @param destination the batch to copy into * @param source the batch to copy from * @param sourceStart the row number to start from in the source * @return the number of rows copied */ void copyIntoBatch(VectorizedRowBatch destination, VectorizedRowBatch source, int sourceStart) { int rows = Math.min(source.size - sourceStart, destination.getMaxSize()); for(int c=0; c < source.cols.length; ++c) { destination.cols[c].reset(); copyColumn(destination.cols[c], source.cols[c], sourceStart, rows); } destination.size = rows; } }
private void forwardBatch(boolean resetValueColumnsOnly) throws HiveException { reducer.process(batch, 0); if (resetValueColumnsOnly) { // Reset just the value columns and value buffer. for (int i = firstValueColumnOffset; i < batch.numCols; i++) { // Note that reset also resets the data buffer for bytes column vectors. batch.cols[i].reset(); } batch.size = 0; } else { // Reset key and value columns; and batch.size batch.reset(); } batchBytes = 0; incrementRowNumber(); }
colVector.reset(); colVector.init();
batch.cols[c].reset();
batch.cols[i].reset();
cv.reset(); cv.ensureSize(batchSize, false); reader.nextVector(cv, null, batchSize);
colVector.reset();