public void convert(Tuple tuple, RowWriter writer) { try { writer.startRow(); for (int i = 0; i < writer.dataTypes().length; i++) { writeField(i, tuple, writer); } } catch (ValueOutOfRangeException e) { writer.cancelRow(); throw e; } writer.endRow(); }
/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
@Override public boolean next(HeapTuple tuple) { if (curRowIdxForRead < rows) { tuple.set(memoryBlock, curPosForRead, dataTypes); curPosForRead += tuple.getLength(); curRowIdxForRead++; memoryBlock.readerPosition(curPosForRead); return true; } else { return false; } }
@Override public boolean startRow() { memoryBlock.writerPosition(0); return super.startRow(); }
@Override public boolean next(ZeroCopyTuple tuple) { if (curRowIdxForRead < rows) { tuple.set(memoryBlock, curPosForRead, dataTypes); curPosForRead += tuple.getLength(); curRowIdxForRead++; memoryBlock.readerPosition(curPosForRead); return true; } else { return false; } }
public void set(UnSafeTuple tuple) { this.memoryBlock = tuple.memoryBlock; this.types = tuple.types; super.set(tuple.getRelativePos()); }
public void convert(Tuple tuple, RowWriter writer) { try { writer.startRow(); for (int i = 0; i < writer.dataTypes().length; i++) { writeField(i, tuple, writer); } } catch (ValueOutOfRangeException e) { writer.cancelRow(); throw e; } writer.endRow(); }
/** * Forward the address; * * @param length Length to be forwarded */ public void forward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() + length); }
@Override public boolean next(HeapTuple tuple) { if (curRowIdxForRead < rows) { tuple.set(memoryBlock, curPosForRead, dataTypes); curPosForRead += tuple.getLength(); curRowIdxForRead++; memoryBlock.readerPosition(curPosForRead); return true; } else { return false; } }
@Override public boolean startRow() { memoryBlock.writerPosition(0); return super.startRow(); }
public void set(UnSafeTuple tuple) { this.memoryBlock = tuple.memoryBlock; this.types = tuple.types; super.set(tuple.getRelativePos()); }
/** * Backward the address; * * @param length Length to be backwarded */ public void backward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() - length); }
/** * Forward the address; * * @param length Length to be forwarded */ public void forward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() + length); }
/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
/** * Backward the address; * * @param length Length to be backwarded */ public void backward(int length) { rowBlock.getMemory().writerPosition(rowBlock.getMemory().writerPosition() - length); }