Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::OldHashTable::Iterator Class Reference

stl-like iterator interface. More...

#include <old-hash-table.h>

Collaboration diagram for impala::OldHashTable::Iterator:

Public Member Functions

 Iterator ()
 
template<bool check_match>
void IR_ALWAYS_INLINE Next ()
 
bool NextUnmatched ()
 
TupleRowGetRow ()
 
TupleGetTuple ()
 
void set_matched (bool v)
 
bool matched () const
 
void reset ()
 
bool AtEnd () const
 Returns true if this iterator is at the end, i.e. GetRow() cannot be called. More...
 
bool operator!= (const Iterator &rhs)
 
bool operator== (const Iterator &rhs)
 
template<bool check_match>
void Next ()
 

Private Member Functions

 Iterator (OldHashTable *table, int bucket_idx, Node *node, uint32_t hash)
 

Private Attributes

OldHashTabletable_
 
int64_t bucket_idx_
 Current bucket idx. More...
 
Nodenode_
 Current node idx (within current bucket) More...
 
uint32_t scan_hash_
 Cached hash value for the row passed to Find() More...
 

Friends

class OldHashTable
 

Detailed Description

stl-like iterator interface.

Definition at line 247 of file old-hash-table.h.

Constructor & Destructor Documentation

impala::OldHashTable::Iterator::Iterator ( )
inline

Definition at line 249 of file old-hash-table.h.

impala::OldHashTable::Iterator::Iterator ( OldHashTable table,
int  bucket_idx,
Node node,
uint32_t  hash 
)
inlineprivate

Definition at line 303 of file old-hash-table.h.

Member Function Documentation

bool impala::OldHashTable::Iterator::AtEnd ( ) const
inline
TupleRow* impala::OldHashTable::Iterator::GetRow ( )
inline
bool impala::OldHashTable::Iterator::matched ( ) const
inline

Definition at line 282 of file old-hash-table.h.

References AtEnd(), impala::OldHashTable::Node::matched, and node_.

Referenced by impala::HashJoinNode::GetNext().

template<bool check_match>
void IR_ALWAYS_INLINE impala::OldHashTable::Iterator::Next ( )

Iterates to the next element. In the case where the iterator was from a Find, this will lazily evaluate that bucket, only returning TupleRows that match the current scan row. No-op if the iterator is at the end.

Referenced by impala::OldHashTable::AddBitmapFilters(), impala::AggregationNode::Close(), impala::OldHashTableTest::FullScan(), impala::HashJoinNode::GetNext(), impala::AggregationNode::GetNext(), impala::OldHashTableTest::ProbeTest(), and impala::HashJoinNode::ProcessProbeBatch().

bool impala::OldHashTable::Iterator::NextUnmatched ( )
inline

Iterates to the next element that does not have its matched flag set. Returns false if it reaches the end of the table without finding an unmatched element. Used in right-outer and full-outer joins.

Definition at line 159 of file old-hash-table.inline.h.

References impala::OldHashTable::Bucket::node.

bool impala::OldHashTable::Iterator::operator!= ( const Iterator rhs)
inline

Definition at line 294 of file old-hash-table.h.

bool impala::OldHashTable::Iterator::operator== ( const Iterator rhs)
inline

Definition at line 296 of file old-hash-table.h.

References bucket_idx_, and node_.

void impala::OldHashTable::Iterator::reset ( )
inline

Definition at line 287 of file old-hash-table.h.

References bucket_idx_, and node_.

void impala::OldHashTable::Iterator::set_matched ( bool  v)
inline

Definition at line 277 of file old-hash-table.h.

References AtEnd(), impala::OldHashTable::Node::matched, and node_.

Referenced by impala::HashJoinNode::GetNext().

Friends And Related Function Documentation

friend class OldHashTable
friend

Definition at line 301 of file old-hash-table.h.

Member Data Documentation

int64_t impala::OldHashTable::Iterator::bucket_idx_
private

Current bucket idx.

Definition at line 313 of file old-hash-table.h.

Referenced by Next(), operator==(), and reset().

Node* impala::OldHashTable::Iterator::node_
private

Current node idx (within current bucket)

Definition at line 316 of file old-hash-table.h.

Referenced by AtEnd(), GetRow(), GetTuple(), matched(), Next(), operator==(), reset(), and set_matched().

uint32_t impala::OldHashTable::Iterator::scan_hash_
private

Cached hash value for the row passed to Find()

Definition at line 319 of file old-hash-table.h.

Referenced by Next().

OldHashTable* impala::OldHashTable::Iterator::table_
private

Definition at line 310 of file old-hash-table.h.

Referenced by GetRow(), GetTuple(), and Next().


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