apache/tajo — pull request #133 by hyunsik (2014-09-04 12:57:08+00:00)
Title: TAJO-907: Implement off-heap tuple block and zero-copy tuple.

Hi folks,

One week ago, I contributed run-time code generation for computation efficiency and reduction of objection creations. This work has also the similar purpose.

This patch includes off-heap memory and row block (a list of tuple) using off-heap memory container. Also, it provides various utility classes for them.

In detail, this patch includes lots of changes.
* OffHeapMemory class
* OffHeapRowBlock class
* ZeroCopyTuple, which just points to actual row record stored in OffHeapRowBlock.
* RowWriter interface
* RowBlockReader interface and OffHeapBlockReader
* TupleBuilder and BaseTupleBuilder
* HeapTuple, which keeps fields in byte array instead of Datum array.
* HeapTuple internally UnSafe to read and store field values in byte array
* TupleComparatorCompiler, which is run-time code compiler for TupleComparator
* It reduces branches even though tuple comparator actually should consider complex logic with all null-first/last, ascending, and descending orders.
* Others

Later, I'll replace current VTuple by HeapTuple or ZeroCopyTuple. Also, I'm planning the improvement to replace current pull-iterator model of execution engine by the push-based block iterator model. I'll describe it later in another jira issue.

Thanks,
Hyunsik