BaseTupleBuilder extends OffHeapRowWriter implements TupleBuilder, Deallocatable { @Override public Tuple build() { return buildToHeapTuple(); } BaseTupleBuilder(Schema schema); @Override long address(); void ensureSize(int size); @Override int position(); @Override void forward(int length); @Override void endRow(); @Override Tuple build(); HeapTuple buildToHeapTuple(); ZeroCopyTuple buildToZeroCopyTuple(); void release();  }
@Test public void testBuild() { BaseTupleBuilder builder = new BaseTupleBuilder(TestOffHeapRowBlock.schema); OffHeapRowBlock rowBlock = TestOffHeapRowBlock.createRowBlock(10248); OffHeapRowBlockReader reader = rowBlock.getReader(); ZeroCopyTuple inputTuple = new ZeroCopyTuple(); HeapTuple heapTuple = null; ZeroCopyTuple zcTuple = null; int i = 0; while(reader.next(inputTuple)) { RowStoreUtil.convert(inputTuple, builder); heapTuple = builder.buildToHeapTuple(); TestOffHeapRowBlock.validateTupleResult(i, heapTuple); zcTuple = builder.buildToZeroCopyTuple(); TestOffHeapRowBlock.validateTupleResult(i, zcTuple); i++; } }