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

#include <hash-join-node.h>

Inheritance diagram for impala::HashJoinNode:
Collaboration diagram for impala::HashJoinNode:

Public Member Functions

 HashJoinNode (ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs)
 
virtual Status Init (const TPlanNode &tnode)
 
virtual Status Prepare (RuntimeState *state)
 
virtual Status GetNext (RuntimeState *state, RowBatch *row_batch, bool *eos)
 
virtual Status Reset (RuntimeState *state)
 
virtual void Close (RuntimeState *state)
 
virtual Status Open (RuntimeState *state)
 
std::string DebugString () const
 Returns a string representation in DFS order of the plan rooted at this. More...
 
void CollectNodes (TPlanNodeType::type node_type, std::vector< ExecNode * > *nodes)
 
void CollectScanNodes (std::vector< ExecNode * > *nodes)
 Collect all scan node types. More...
 
const std::vector< ExprContext * > & conjunct_ctxs () const
 
int id () const
 
TPlanNodeType::type type () const
 
const RowDescriptorrow_desc () const
 
int64_t rows_returned () const
 
int64_t limit () const
 
bool ReachedLimit ()
 
RuntimeProfileruntime_profile ()
 
MemTrackermem_tracker ()
 
MemTrackerexpr_mem_tracker ()
 

Static Public Member Functions

static Status CreateTree (ObjectPool *pool, const TPlan &plan, const DescriptorTbl &descs, ExecNode **root)
 
static void SetDebugOptions (int node_id, TExecNodePhase::type phase, TDebugAction::type action, ExecNode *tree)
 Set debug action for node with given id in 'tree'. More...
 
static bool EvalConjuncts (ExprContext *const *ctxs, int num_ctxs, TupleRow *row)
 
static llvm::Function * CodegenEvalConjuncts (RuntimeState *state, const std::vector< ExprContext * > &conjunct_ctxs, const char *name="EvalConjuncts")
 
static int GetNodeIdFromProfile (RuntimeProfile *p)
 Extract node id from p->name(). More...
 

Static Public Attributes

static const char * LLVM_CLASS_NAME = "class.impala::HashJoinNode"
 
static const std::string ROW_THROUGHPUT_COUNTER = "RowsReturnedRate"
 Names of counters shared by all exec nodes. More...
 

Protected Member Functions

virtual void AddToDebugString (int indentation_level, std::stringstream *out) const
 
virtual Status InitGetNext (TupleRow *first_probe_row)
 
virtual Status ConstructBuildSide (RuntimeState *state)
 
virtual void DebugString (int indentation_level, std::stringstream *out) const
 Subclasses should not override, use AddToDebugString() to add to the result. More...
 
std::string GetLeftChildRowString (TupleRow *row)
 
void CreateOutputRow (TupleRow *out_row, TupleRow *probe_row, TupleRow *build_row)
 
ExecNodechild (int i)
 
bool is_closed ()
 
virtual bool IsScanNode () const
 
void InitRuntimeProfile (const std::string &name)
 
Status ExecDebugAction (TExecNodePhase::type phase, RuntimeState *state)
 
void AddRuntimeExecOption (const std::string &option)
 Appends option to 'runtime_exec_options_'. More...
 
virtual Status QueryMaintenance (RuntimeState *state)
 
void AddExprCtxToFree (ExprContext *ctx)
 
void AddExprCtxsToFree (const std::vector< ExprContext * > &ctxs)
 
void AddExprCtxsToFree (const SortExecExprs &sort_exec_exprs)
 

Static Protected Member Functions

static Status CreateNode (ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs, ExecNode **node)
 Create a single exec node derived from thrift node; place exec node in 'pool'. More...
 
static Status CreateTreeHelper (ObjectPool *pool, const std::vector< TPlanNode > &tnodes, const DescriptorTbl &descs, ExecNode *parent, int *node_idx, ExecNode **root)
 

Protected Attributes

const std::string node_name_
 
TJoinOp::type join_op_
 
bool eos_
 
boost::scoped_ptr< MemPoolbuild_pool_
 
boost::scoped_ptr< RowBatchprobe_batch_
 
bool probe_side_eos_
 
int probe_batch_pos_
 
TupleRowcurrent_probe_row_
 
bool matched_probe_
 
int probe_tuple_row_size_
 
int build_tuple_row_size_
 
TupleRowsemi_join_staging_row_
 
bool can_add_probe_filters_
 
RuntimeProfile::Counterbuild_timer_
 
RuntimeProfile::Counterprobe_timer_
 
RuntimeProfile::Counterbuild_row_counter_
 
RuntimeProfile::Counterprobe_row_counter_
 
int id_
 
TPlanNodeType::type type_
 
ObjectPoolpool_
 
std::vector< ExprContext * > conjunct_ctxs_
 
std::vector< ExecNode * > children_
 
RowDescriptor row_descriptor_
 
TExecNodePhase::type debug_phase_
 
TDebugAction::type debug_action_
 
int64_t limit_
 
int64_t num_rows_returned_
 
boost::scoped_ptr< RuntimeProfileruntime_profile_
 
RuntimeProfile::Counterrows_returned_counter_
 
RuntimeProfile::Counterrows_returned_rate_
 
boost::scoped_ptr< MemTrackermem_tracker_
 Account for peak memory used by this node. More...
 
boost::scoped_ptr< MemTrackerexpr_mem_tracker_
 MemTracker that should be used for ExprContexts. More...
 
boost::mutex exec_options_lock_
 
std::string runtime_exec_options_
 

Private Types

typedef void(* ProcessBuildBatchFn )(HashJoinNode *, RowBatch *)
 
typedef int(* ProcessProbeBatchFn )(HashJoinNode *, RowBatch *, RowBatch *, int)
 HashJoinNode::ProcessProbeBatch() exactly. More...
 

Private Member Functions

Status LeftJoinGetNext (RuntimeState *state, RowBatch *row_batch, bool *eos)
 
int ProcessProbeBatch (RowBatch *out_batch, RowBatch *probe_batch, int max_added_rows)
 
void ProcessBuildBatch (RowBatch *build_batch)
 Construct the build hash table, adding all the rows in 'build_batch'. More...
 
llvm::Function * CodegenCreateOutputRow (LlvmCodeGen *codegen)
 Codegen function to create output row. More...
 
llvm::Function * CodegenProcessBuildBatch (RuntimeState *state, llvm::Function *hash_fn)
 
llvm::Function * CodegenProcessProbeBatch (RuntimeState *state, llvm::Function *hash_fn)
 

Private Attributes

boost::scoped_ptr< OldHashTablehash_tbl_
 
OldHashTable::Iterator hash_tbl_iterator_
 
std::vector< ExprContext * > probe_expr_ctxs_
 
std::vector< ExprContext * > build_expr_ctxs_
 
std::vector< ExprContext * > other_join_conjunct_ctxs_
 non-equi-join conjuncts from the JOIN clause More...
 
bool match_all_probe_
 
bool match_one_build_
 Match at most one build row to each probe row. Used in LEFT_SEMI_JOIN. More...
 
bool match_all_build_
 
llvm::Function * codegen_process_build_batch_fn_
 llvm function for build batch More...
 
ProcessBuildBatchFn process_build_batch_fn_
 
ProcessProbeBatchFn process_probe_batch_fn_
 Jitted ProcessProbeBatch function pointer. Null if codegen is disabled. More...
 
RuntimeProfile::Counterbuild_buckets_counter_
 
RuntimeProfile::Counterhash_tbl_load_factor_counter_
 

Detailed Description

Node for in-memory hash joins:

  • builds up a hash table with the rows produced by our right input (child(1)); build exprs are the rhs exprs of our equi-join predicates
  • for each row from our left input, probes the hash table to retrieve matching entries; the probe exprs are the lhs exprs of our equi-join predicates Row batches:
  • In general, we are not able to pass our output row batch on to our left child (when we're fetching the probe rows): if we have a 1xn join, our output will contain multiple rows per left input row
  • TODO: fix this, so in the case of 1x1/nx1 joins (for instance, fact to dimension tbl) we don't do these extra copies

Definition at line 48 of file hash-join-node.h.

Member Typedef Documentation

typedef void(* impala::HashJoinNode::ProcessBuildBatchFn)(HashJoinNode *, RowBatch *)
private

Function declaration for codegen'd function. Signature must match HashJoinNode::ProcessBuildBatch

Definition at line 95 of file hash-join-node.h.

typedef int(* impala::HashJoinNode::ProcessProbeBatchFn)(HashJoinNode *, RowBatch *, RowBatch *, int)
private

HashJoinNode::ProcessProbeBatch() exactly.

Definition at line 99 of file hash-join-node.h.

Constructor & Destructor Documentation

HashJoinNode::HashJoinNode ( ObjectPool pool,
const TPlanNode &  tnode,
const DescriptorTbl descs 
)

Member Function Documentation

void impala::ExecNode::AddExprCtxsToFree ( const SortExecExprs sort_exec_exprs)
protectedinherited
void impala::ExecNode::AddExprCtxToFree ( ExprContext ctx)
inlineprotectedinherited

Add an ExprContext to have its local allocations freed by QueryMaintenance(). Exprs that are evaluated in the main execution thread should be added. Exprs evaluated in a separate thread are generally not safe to add, since a local allocation may be freed while it's being used. Rather than using this mechanism, threads should call FreeLocalAllocations() on local ExprContexts periodically.

Definition at line 276 of file exec-node.h.

References impala::ExecNode::expr_ctxs_to_free_.

Referenced by impala::AnalyticEvalNode::Prepare().

void HashJoinNode::AddToDebugString ( int  indentation_level,
std::stringstream *  out 
) const
protectedvirtual

Gives subclasses an opportunity to add debug output to the debug string printed by DebugString().

Reimplemented from impala::BlockingJoinNode.

Definition at line 424 of file hash-join-node.cc.

References build_expr_ctxs_, impala::Expr::DebugString(), and probe_expr_ctxs_.

ExecNode* impala::ExecNode::child ( int  i)
inlineprotectedinherited
Status HashJoinNode::Close ( RuntimeState state)
virtual
Function * HashJoinNode::CodegenProcessBuildBatch ( RuntimeState state,
llvm::Function *  hash_fn 
)
private

Codegen processing build batches. Identical signature to ProcessBuildBatch. hash_fn is the codegen'd function for computing hashes over tuple rows in the hash table. Returns NULL if codegen was not possible.

Definition at line 532 of file hash-join-node.cc.

References impala::RuntimeState::GetCodegen(), impala::LlvmCodeGen::GetFunction(), hash_tbl_, impala::Status::ok(), impala::LlvmCodeGen::OptimizeFunctionWithExprs(), and impala::LlvmCodeGen::ReplaceCallSites().

Referenced by Prepare().

Function * HashJoinNode::CodegenProcessProbeBatch ( RuntimeState state,
llvm::Function *  hash_fn 
)
private

Codegen processing probe batches. Identical signature to ProcessProbeBatch. hash_fn is the codegen'd function for computing hashes over tuple rows in the hash table. Returns NULL if codegen was not possible.

Definition at line 559 of file hash-join-node.cc.

References CodegenCreateOutputRow(), impala::ExecNode::CodegenEvalConjuncts(), impala::ExecNode::conjunct_ctxs_, impala::RuntimeState::GetCodegen(), impala::LlvmCodeGen::GetFunction(), hash_tbl_, impala::Status::ok(), impala::LlvmCodeGen::OptimizeFunctionWithExprs(), other_join_conjunct_ctxs_, and impala::LlvmCodeGen::ReplaceCallSites().

Referenced by Prepare().

void impala::ExecNode::CollectNodes ( TPlanNodeType::type  node_type,
std::vector< ExecNode * > *  nodes 
)
inherited

Collect all nodes of given 'node_type' that are part of this subtree, and return in 'nodes'.

Definition at line 359 of file exec-node.cc.

References impala::ExecNode::children_, and impala::ExecNode::type_.

Referenced by impala::ExecNode::CollectScanNodes(), and impala::PlanFragmentExecutor::Prepare().

void impala::ExecNode::CollectScanNodes ( std::vector< ExecNode * > *  nodes)
inherited

Collect all scan node types.

Definition at line 366 of file exec-node.cc.

References impala::ExecNode::CollectNodes().

Referenced by impala::PlanFragmentExecutor::Prepare().

Status impala::ExecNode::CreateNode ( ObjectPool pool,
const TPlanNode &  tnode,
const DescriptorTbl descs,
ExecNode **  node 
)
staticprotectedinherited

Create a single exec node derived from thrift node; place exec node in 'pool'.

Definition at line 260 of file exec-node.cc.

References impala::ObjectPool::Add(), impala::Status::OK, and RETURN_IF_ERROR.

Referenced by impala::ExecNode::CreateTreeHelper().

void BlockingJoinNode::CreateOutputRow ( TupleRow out_row,
TupleRow probe_row,
TupleRow build_row 
)
protectedinherited
Status impala::ExecNode::CreateTree ( ObjectPool pool,
const TPlan &  plan,
const DescriptorTbl descs,
ExecNode **  root 
)
staticinherited

Creates exec node tree from list of nodes contained in plan via depth-first traversal. All nodes are placed in pool. Returns error if 'plan' is corrupted, otherwise success.

Definition at line 199 of file exec-node.cc.

References impala::ExecNode::CreateTreeHelper(), impala::Status::OK, and impala::Status::ok().

Referenced by impala::PlanFragmentExecutor::Prepare().

Status impala::ExecNode::CreateTreeHelper ( ObjectPool pool,
const std::vector< TPlanNode > &  tnodes,
const DescriptorTbl descs,
ExecNode parent,
int *  node_idx,
ExecNode **  root 
)
staticprotectedinherited
void BlockingJoinNode::DebugString ( int  indentation_level,
std::stringstream *  out 
) const
protectedvirtualinherited
string BlockingJoinNode::GetLeftChildRowString ( TupleRow row)
protectedinherited

Returns a debug string for the left child's 'row'. They have tuple ptrs that are uninitialized; the left child only populates the tuple ptrs it is responsible for. This function outputs just the row values and leaves the build side values as NULL. This is only used for debugging and outputting the left child rows before doing the join.

Definition at line 222 of file blocking-join-node.cc.

References impala::ExecNode::child(), impala::TupleRow::GetTuple(), impala::PrintTuple(), impala::ExecNode::row_desc(), and impala::RowDescriptor::tuple_descriptors().

Referenced by GetNext().

Status HashJoinNode::GetNext ( RuntimeState state,
RowBatch row_batch,
bool eos 
)
virtual

Retrieves rows and returns them via row_batch. Sets eos to true if subsequent calls will not retrieve any more rows. Data referenced by any tuples returned in row_batch must not be overwritten by the callee until Close() is called. The memory holding that data can be returned via row_batch's tuple_data_pool (in which case it may be deleted by the caller) or held on to by the callee. The row_batch, including its tuple_data_pool, will be destroyed by the caller at some point prior to the final Close() call. In other words, if the memory holding the tuple data will be referenced by the callee in subsequent GetNext() calls, it must not be attached to the row_batch's tuple_data_pool. Caller must not be holding any io buffers. This will cause deadlock. TODO: AggregationNode and HashJoinNode cannot be "re-opened" yet.

Implements impala::ExecNode.

Definition at line 218 of file hash-join-node.cc.

References impala::RowBatch::AddRow(), impala::RowBatch::AtCapacity(), impala::OldHashTable::Iterator::AtEnd(), impala::ExecNode::child(), impala::RowBatch::CommitLastRow(), impala::ExecNode::conjunct_ctxs(), impala::ExecNode::conjunct_ctxs_, COUNTER_ADD, COUNTER_SET, impala::BlockingJoinNode::CreateOutputRow(), impala::BlockingJoinNode::current_probe_row_, impala::BlockingJoinNode::eos_, impala::ExecNode::EvalConjuncts(), impala::ExecNode::ExecDebugAction(), impala::BlockingJoinNode::GetLeftChildRowString(), impala::RowBatch::GetRow(), impala::OldHashTable::Iterator::GetRow(), hash_tbl_, hash_tbl_iterator_, LeftJoinGetNext(), match_all_build_, match_all_probe_, impala::OldHashTable::Iterator::matched(), impala::BlockingJoinNode::matched_probe_, impala::OldHashTable::Iterator::Next(), impala::ExecNode::num_rows_returned_, impala::Status::OK, other_join_conjunct_ctxs_, impala::PrintRow(), impala::BlockingJoinNode::probe_batch_, impala::BlockingJoinNode::probe_batch_pos_, impala::BlockingJoinNode::probe_row_counter_, impala::BlockingJoinNode::probe_side_eos_, impala::BlockingJoinNode::probe_timer_, impala::ExecNode::QueryMaintenance(), impala::ExecNode::ReachedLimit(), RETURN_IF_CANCELLED, RETURN_IF_ERROR, impala::ExecNode::row_desc(), impala::ExecNode::rows_returned_counter_, impala::ExecNode::runtime_profile_, SCOPED_TIMER, impala::OldHashTable::Iterator::set_matched(), impala::ScopedTimer< T >::Start(), impala::ScopedTimer< T >::Stop(), and VLOG_ROW.

Referenced by ConstructBuildSide(), and LeftJoinGetNext().

int impala::ExecNode::GetNodeIdFromProfile ( RuntimeProfile p)
staticinherited

Extract node id from p->name().

Definition at line 62 of file exec-node.cc.

References impala::RuntimeProfile::metadata().

Status HashJoinNode::Init ( const TPlanNode &  tnode)
virtual
Status HashJoinNode::InitGetNext ( TupleRow first_left_child_row)
protectedvirtual

Init the build-side state for a new left child row (e.g. hash table iterator or list iterator) given the first row. Used in Open() to prepare for GetNext(). A NULL ptr for first_left_child_row indicates the left child eos.

Implements impala::BlockingJoinNode.

Definition at line 208 of file hash-join-node.cc.

References hash_tbl_, hash_tbl_iterator_, impala::BlockingJoinNode::matched_probe_, and impala::Status::OK.

void impala::ExecNode::InitRuntimeProfile ( const std::string &  name)
protectedinherited
virtual bool impala::ExecNode::IsScanNode ( ) const
inlineprotectedvirtualinherited

Reimplemented in impala::ScanNode.

Definition at line 251 of file exec-node.h.

int64_t impala::ExecNode::limit ( ) const
inlineinherited

Definition at line 158 of file exec-node.h.

References impala::ExecNode::limit_.

Referenced by impala::CrossJoinNode::GetNext(), and LeftJoinGetNext().

Status BlockingJoinNode::Open ( RuntimeState state)
virtualinherited

Open prepares the build side structures (subclasses should implement ConstructBuildSide()) and then prepares for GetNext with the first left child row (subclasses should implement InitGetNext()).

Reimplemented from impala::ExecNode.

Definition at line 156 of file blocking-join-node.cc.

References impala::ExecNode::AddRuntimeExecOption(), impala::CgroupsMgr::AssignThreadToCgroup(), impala::BlockingJoinNode::BuildSideThread(), impala::RuntimeState::cgroup(), impala::ExecEnv::cgroups_mgr(), impala::ExecNode::child(), impala::BlockingJoinNode::ConstructBuildSide(), COUNTER_ADD, impala::BlockingJoinNode::current_probe_row_, impala::BlockingJoinNode::eos_, impala::RuntimeState::exec_env(), impala::Promise< T >::Get(), impala::ExecNode::GetNext(), impala::BlockingJoinNode::InitGetNext(), impala::RuntimeState::LogError(), impala::Status::msg(), impala::BlockingJoinNode::node_name_, impala::Status::OK, impala::Status::ok(), impala::ExecNode::Open(), impala::BlockingJoinNode::probe_batch_, impala::BlockingJoinNode::probe_batch_pos_, impala::BlockingJoinNode::probe_row_counter_, impala::BlockingJoinNode::probe_side_eos_, impala::ExecNode::QueryMaintenance(), impala::RuntimeState::resource_pool(), RETURN_IF_CANCELLED, RETURN_IF_ERROR, impala::ExecNode::runtime_profile_, SCOPED_TIMER, and impala::ThreadResourceMgr::ResourcePool::TryAcquireThreadToken().

Referenced by impala::CrossJoinNode::ConstructBuildSide(), ConstructBuildSide(), and impala::PartitionedHashJoinNode::ConstructBuildSide().

void HashJoinNode::ProcessBuildBatch ( RowBatch build_batch)
private

Construct the build hash table, adding all the rows in 'build_batch'.

Definition at line 129 of file hash-join-node-ir.cc.

References impala::RowBatch::GetRow(), hash_tbl_, and impala::RowBatch::num_rows().

Referenced by ConstructBuildSide().

Status impala::ExecNode::QueryMaintenance ( RuntimeState state)
protectedvirtualinherited
Status HashJoinNode::Reset ( RuntimeState state)
virtual

Subclasses should reset any state modified in Open() and GetNext() and then call BlockingJoinNode::Reset().

Reimplemented from impala::BlockingJoinNode.

Definition at line 140 of file hash-join-node.cc.

void impala::ExecNode::SetDebugOptions ( int  node_id,
TExecNodePhase::type  phase,
TDebugAction::type  action,
ExecNode tree 
)
staticinherited

Set debug action for node with given id in 'tree'.

Definition at line 332 of file exec-node.cc.

References impala::ExecNode::children_, impala::ExecNode::debug_action_, impala::ExecNode::debug_phase_, and impala::ExecNode::id_.

Referenced by impala::PlanFragmentExecutor::Prepare().

TPlanNodeType::type impala::ExecNode::type ( ) const
inlineinherited

Member Data Documentation

RuntimeProfile::Counter* impala::HashJoinNode::build_buckets_counter_
private

Definition at line 103 of file hash-join-node.h.

Referenced by ConstructBuildSide(), and Prepare().

std::vector<ExprContext*> impala::HashJoinNode::build_expr_ctxs_
private

Definition at line 73 of file hash-join-node.h.

Referenced by AddToDebugString(), Close(), ConstructBuildSide(), Init(), and Prepare().

boost::scoped_ptr<MemPool> impala::BlockingJoinNode::build_pool_
protectedinherited
RuntimeProfile::Counter* impala::BlockingJoinNode::build_timer_
protectedinherited
int impala::BlockingJoinNode::build_tuple_row_size_
protectedinherited
bool impala::BlockingJoinNode::can_add_probe_filters_
protectedinherited
llvm::Function* impala::HashJoinNode::codegen_process_build_batch_fn_
private

llvm function for build batch

Definition at line 91 of file hash-join-node.h.

Referenced by Prepare().

TDebugAction::type impala::ExecNode::debug_action_
protectedinherited
TExecNodePhase::type impala::ExecNode::debug_phase_
protectedinherited

debug-only: if debug_action_ is not INVALID, node will perform action in debug_phase_

Definition at line 219 of file exec-node.h.

Referenced by impala::ExecNode::ExecDebugAction(), and impala::ExecNode::SetDebugOptions().

boost::mutex impala::ExecNode::exec_options_lock_
protectedinherited

Execution options that are determined at runtime. This is added to the runtime profile at Close(). Examples for options logged here would be "Codegen Enabled"

Definition at line 238 of file exec-node.h.

Referenced by impala::ExecNode::AddRuntimeExecOption().

boost::scoped_ptr<MemTracker> impala::ExecNode::expr_mem_tracker_
protectedinherited

MemTracker that should be used for ExprContexts.

Definition at line 233 of file exec-node.h.

Referenced by impala::ExecNode::expr_mem_tracker(), and impala::ExecNode::Prepare().

boost::scoped_ptr<OldHashTable> impala::HashJoinNode::hash_tbl_
private
OldHashTable::Iterator impala::HashJoinNode::hash_tbl_iterator_
private

Definition at line 68 of file hash-join-node.h.

Referenced by GetNext(), InitGetNext(), LeftJoinGetNext(), and ProcessProbeBatch().

RuntimeProfile::Counter* impala::HashJoinNode::hash_tbl_load_factor_counter_
private

Definition at line 104 of file hash-join-node.h.

Referenced by ConstructBuildSide(), and Prepare().

const char * HashJoinNode::LLVM_CLASS_NAME = "class.impala::HashJoinNode"
static

Definition at line 59 of file hash-join-node.h.

bool impala::HashJoinNode::match_all_build_
private

Output all rows coming from the build input. Used in RIGHT_OUTER_JOIN and FULL_OUTER_JOIN.

Definition at line 88 of file hash-join-node.h.

Referenced by GetNext(), HashJoinNode(), Prepare(), and ProcessProbeBatch().

bool impala::HashJoinNode::match_all_probe_
private

Derived from join_op_ Output all rows coming from the probe input. Used in LEFT_OUTER_JOIN and FULL_OUTER_JOIN.

Definition at line 81 of file hash-join-node.h.

Referenced by CodegenCreateOutputRow(), GetNext(), HashJoinNode(), and ProcessProbeBatch().

bool impala::HashJoinNode::match_one_build_
private

Match at most one build row to each probe row. Used in LEFT_SEMI_JOIN.

Definition at line 84 of file hash-join-node.h.

Referenced by HashJoinNode(), and ProcessProbeBatch().

bool impala::BlockingJoinNode::matched_probe_
protectedinherited
boost::scoped_ptr<MemTracker> impala::ExecNode::mem_tracker_
protectedinherited

Account for peak memory used by this node.

Definition at line 230 of file exec-node.h.

Referenced by impala::ExecNode::mem_tracker(), and impala::ExecNode::Prepare().

const std::string impala::BlockingJoinNode::node_name_
protectedinherited
std::vector<ExprContext*> impala::HashJoinNode::other_join_conjunct_ctxs_
private

non-equi-join conjuncts from the JOIN clause

Definition at line 76 of file hash-join-node.h.

Referenced by Close(), CodegenProcessProbeBatch(), ConstructBuildSide(), GetNext(), Init(), Prepare(), and ProcessProbeBatch().

std::vector<ExprContext*> impala::HashJoinNode::probe_expr_ctxs_
private

our equi-join predicates "<lhs> = <rhs>" are separated into build_exprs_ (over child(1)) and probe_exprs_ (over child(0))

Definition at line 72 of file hash-join-node.h.

Referenced by AddToDebugString(), Close(), ConstructBuildSide(), Init(), and Prepare().

int impala::BlockingJoinNode::probe_tuple_row_size_
protectedinherited

Size of the TupleRow (just the Tuple ptrs) from the build (right) and probe (left) sides. Set to zero if the build/probe tuples are not returned, e.g., for semi joins. Cached because it is used in the hot path.

Definition at line 88 of file blocking-join-node.h.

Referenced by CodegenCreateOutputRow(), impala::PartitionedHashJoinNode::CodegenCreateOutputRow(), impala::BlockingJoinNode::CreateOutputRow(), and impala::BlockingJoinNode::Prepare().

ProcessBuildBatchFn impala::HashJoinNode::process_build_batch_fn_
private

Definition at line 96 of file hash-join-node.h.

Referenced by ConstructBuildSide(), and Prepare().

ProcessProbeBatchFn impala::HashJoinNode::process_probe_batch_fn_
private

Jitted ProcessProbeBatch function pointer. Null if codegen is disabled.

Definition at line 101 of file hash-join-node.h.

Referenced by LeftJoinGetNext(), and Prepare().

RowDescriptor impala::ExecNode::row_descriptor_
protectedinherited
const string impala::ExecNode::ROW_THROUGHPUT_COUNTER = "RowsReturnedRate"
staticinherited

Names of counters shared by all exec nodes.

Definition at line 169 of file exec-node.h.

Referenced by impala::ExecNode::Prepare().

RuntimeProfile::Counter* impala::ExecNode::rows_returned_rate_
protectedinherited

Definition at line 227 of file exec-node.h.

Referenced by impala::ExecNode::Prepare().

std::string impala::ExecNode::runtime_exec_options_
protectedinherited

Definition at line 239 of file exec-node.h.

Referenced by impala::ExecNode::AddRuntimeExecOption().

boost::scoped_ptr<RuntimeProfile> impala::ExecNode::runtime_profile_
protectedinherited
TupleRow* impala::BlockingJoinNode::semi_join_staging_row_
protectedinherited

Row assembled from all lhs and rhs tuples used for evaluating the non-equi-join conjuncts for semi joins. Semi joins only return the lhs or rhs output tuples, so this tuple is temporarily assembled for evaluating the conjuncts.

Definition at line 94 of file blocking-join-node.h.

Referenced by impala::BlockingJoinNode::Close(), impala::PartitionedHashJoinNode::EvaluateNullProbe(), impala::PartitionedHashJoinNode::OutputNullAwareProbeRows(), impala::BlockingJoinNode::Prepare(), ProcessProbeBatch(), and impala::PartitionedHashJoinNode::ProcessProbeBatch().

TPlanNodeType::type impala::ExecNode::type_
protectedinherited

Definition at line 210 of file exec-node.h.

Referenced by impala::ExecNode::CollectNodes(), and impala::ExecNode::type().


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