@Override public void reset() { curPosForRead = 0; curRowIdxForRead = 0; memoryBlock.readerPosition(curPosForRead); } }
@Override public void reset() { curPosForRead = 0; curRowIdxForRead = 0; memoryBlock.readerPosition(curPosForRead); } }
@Override public void reset() { curPosForRead = 0; curRowIdxForRead = 0; memoryBlock.readerPosition(curPosForRead); } }
@Override public void reset() { curPosForRead = 0; curRowIdxForRead = 0; memoryBlock.readerPosition(curPosForRead); } }
@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; } }
@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 next(ZeroCopyTuple tuple) { if (curRowIdxForRead < rows) { tuple.set(memoryBlock, curPosForRead, dataTypes); curPosForRead += tuple.getLength(); curRowIdxForRead++; memoryBlock.readerPosition(curPosForRead); return true; } else { return false; } }
@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; } }
public UnSafeTuple buildToZeroCopyTuple() { UnSafeTuple zcTuple = new UnSafeTuple(); zcTuple.set(memoryBlock, memoryBlock.readerPosition(), dataTypes()); return zcTuple; }
public UnSafeTuple buildToZeroCopyTuple() { UnSafeTuple zcTuple = new UnSafeTuple(); zcTuple.set(memoryBlock, memoryBlock.readerPosition(), dataTypes()); return zcTuple; }
protected boolean fillDrawBuffer(ScatteringByteChannel channel) throws IOException { reset(); int readBytes = memory.writeBytes(channel); if (readBytes > 0) { // get row capacity in buffer while (memory.isReadable()) { if (memory.readableBytes() < SizeOf.SIZE_OF_INT) { return true; } int recordSize = PlatformDependent.getInt(memory.address() + memory.readerPosition()); assert recordSize > 0; if (memory.readableBytes() < recordSize) { return true; } else { memory.readerPosition(memory.readerPosition() + recordSize); } rowNum++; } return true; } else { return false; } }
protected boolean fillDrawBuffer(ScatteringByteChannel channel) throws IOException { reset(); int readBytes = memory.writeBytes(channel); if (readBytes > 0) { // get row capacity in buffer while (memory.isReadable()) { if (memory.readableBytes() < SizeOf.SIZE_OF_INT) { return true; } int recordSize = PlatformDependent.getInt(memory.address() + memory.readerPosition()); assert recordSize > 0; if (memory.readableBytes() < recordSize) { return true; } else { memory.readerPosition(memory.readerPosition() + recordSize); } rowNum++; } return true; } else { return false; } }