Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::Sorter::TupleSorter Class Reference
Collaboration diagram for impala::Sorter::TupleSorter:

Classes

class  TupleIterator
 

Public Member Functions

 TupleSorter (const TupleRowComparator &less_than_comp, int64_t block_size, int tuple_size, RuntimeState *state)
 
 ~TupleSorter ()
 
void Sort (Run *run)
 

Private Member Functions

void InsertionSort (const TupleIterator &first, const TupleIterator &last)
 
TupleIterator Partition (TupleIterator first, TupleIterator last, Tuple *pivot)
 
void SortHelper (TupleIterator first, TupleIterator last)
 
void Swap (uint8_t *left, uint8_t *right)
 

Private Attributes

const int tuple_size_
 
const int block_capacity_
 
const int last_tuple_block_offset_
 
const TupleRowComparator less_than_comp_
 
RuntimeState *const state_
 
Runrun_
 
TupleRowtemp_tuple_row_
 
uint8_t * temp_tuple_buffer_
 
uint8_t * swap_buffer_
 

Static Private Attributes

static const int INSERTION_THRESHOLD = 16
 

Detailed Description

Definition at line 202 of file sorter.cc.

Constructor & Destructor Documentation

impala::Sorter::TupleSorter::TupleSorter ( const TupleRowComparator less_than_comp,
int64_t  block_size,
int  tuple_size,
RuntimeState state 
)

Definition at line 758 of file sorter.cc.

References swap_buffer_, temp_tuple_buffer_, and temp_tuple_row_.

impala::Sorter::TupleSorter::~TupleSorter ( )

Definition at line 770 of file sorter.cc.

Member Function Documentation

void impala::Sorter::TupleSorter::Sort ( Run run)

Definition at line 775 of file sorter.cc.

References impala::Sorter::Run::is_sorted_.

void impala::Sorter::TupleSorter::Swap ( uint8_t *  left,
uint8_t *  right 
)
inlineprivate

Definition at line 863 of file sorter.cc.

Member Data Documentation

const int impala::Sorter::TupleSorter::block_capacity_
private
const int impala::Sorter::TupleSorter::INSERTION_THRESHOLD = 16
staticprivate

Definition at line 216 of file sorter.cc.

const int impala::Sorter::TupleSorter::last_tuple_block_offset_
private

Definition at line 299 of file sorter.cc.

const TupleRowComparator impala::Sorter::TupleSorter::less_than_comp_
private

Definition at line 302 of file sorter.cc.

Run* impala::Sorter::TupleSorter::run_
private
RuntimeState* const impala::Sorter::TupleSorter::state_
private

Definition at line 305 of file sorter.cc.

uint8_t* impala::Sorter::TupleSorter::swap_buffer_
private

Definition at line 314 of file sorter.cc.

Referenced by TupleSorter().

uint8_t* impala::Sorter::TupleSorter::temp_tuple_buffer_
private

Definition at line 313 of file sorter.cc.

Referenced by TupleSorter().

TupleRow* impala::Sorter::TupleSorter::temp_tuple_row_
private

Definition at line 312 of file sorter.cc.

Referenced by TupleSorter().

const int impala::Sorter::TupleSorter::tuple_size_
private

The documentation for this class was generated from the following file: