16 #ifndef IMPALA_EXEC_AGGREGATION_NODE_H
17 #define IMPALA_EXEC_AGGREGATION_NODE_H
20 #include <boost/scoped_ptr.hpp>
40 class TupleDescriptor;
64 virtual void DebugString(
int indentation_level, std::stringstream* out)
const;
stl-like iterator interface.
static const char * LLVM_CLASS_NAME
TupleDescriptor * output_tuple_desc_
void(* ProcessRowBatchFn)(AggregationNode *, RowBatch *)
virtual Status Prepare(RuntimeState *state)
std::vector< ExprContext * > build_expr_ctxs_
llvm::Function * CodegenUpdateSlot(RuntimeState *state, AggFnEvaluator *evaluator, SlotDescriptor *slot_desc)
AggregationNode(ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs)
RuntimeProfile::Counter * build_timer_
Time spent processing the child rows.
A tuple with 0 materialised slots is represented as NULL.
virtual Status GetNext(RuntimeState *state, RowBatch *row_batch, bool *eos)
TupleId intermediate_tuple_id_
Tuple into which Update()/Merge()/Serialize() results are stored.
Tuple * ConstructIntermediateTuple()
Tuple * singleton_intermediate_tuple_
virtual Status Reset(RuntimeState *state)
llvm::Function * CodegenUpdateTuple(RuntimeState *state)
Codegen UpdateTuple(). Returns NULL if codegen is unsuccessful.
void ProcessRowBatchWithGrouping(RowBatch *batch)
std::string DebugString() const
Returns a string representation in DFS order of the plan rooted at this.
std::vector< ExprContext * > probe_expr_ctxs_
Exprs used to evaluate input rows.
void UpdateTuple(Tuple *tuple, TupleRow *row)
void ProcessRowBatchNoGrouping(RowBatch *batch)
Do the aggregation for all tuple rows in the batch.
llvm::Function * codegen_process_row_batch_fn_
IR for process row batch. NULL if codegen is disabled.
virtual Status Open(RuntimeState *state)
std::vector< AggFnEvaluator * > aggregate_evaluators_
std::vector< impala_udf::FunctionContext * > agg_fn_ctxs_
FunctionContext for each agg fn and backing pool.
Tuple * FinalizeTuple(Tuple *tuple, MemPool *pool)
OldHashTable::Iterator output_iterator_
boost::scoped_ptr< MemPool > agg_fn_pool_
RuntimeProfile::Counter * get_results_timer_
Time spent returning the aggregated rows.
RuntimeProfile::Counter * hash_table_load_factor_counter_
Load factor in hash table.
ProcessRowBatchFn process_row_batch_fn_
Jitted ProcessRowBatch function pointer. Null if codegen is disabled.
TupleDescriptor * intermediate_tuple_desc_
RuntimeProfile::Counter * hash_table_buckets_counter_
Num buckets in hash table.
boost::scoped_ptr< MemPool > tuple_pool_
llvm::Function * CodegenProcessRowBatch(RuntimeState *state, llvm::Function *update_tuple_fn)
virtual void Close(RuntimeState *state)
boost::scoped_ptr< OldHashTable > hash_tbl_
virtual Status Init(const TPlanNode &tnode)