16 #ifndef IMPALA_EXEC_UNION_NODE_H_
17 #define IMPALA_EXEC_UNION_NODE_H_
19 #include <boost/scoped_ptr.hpp>
24 #include <boost/scoped_ptr.hpp>
int child_idx_
Index of current child.
const TupleDescriptor * tuple_desc_
Descriptor for tuples this union node constructs.
std::vector< std::vector< ExprContext * > > const_result_expr_ctx_lists_
Const exprs materialized by this node. These exprs don't refer to any children.
virtual Status Open(RuntimeState *state)
virtual Status GetNext(RuntimeState *state, RowBatch *row_batch, bool *eos)
bool EvalAndMaterializeExprs(const std::vector< ExprContext * > &ctxs, bool const_exprs, Tuple **tuple, RowBatch *row_batch)
A tuple with 0 materialised slots is represented as NULL.
std::vector< std::vector< ExprContext * > > result_expr_ctx_lists_
Exprs materialized by this node. The i-th result expr list refers to the i-th child.
int child_row_idx_
Index of current row in child_row_batch_.
int const_result_expr_idx_
Index of current const result expr list.
UnionNode(ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs)
virtual Status Reset(RuntimeState *state)
std::vector< SlotDescriptor * > materialized_slots_
those tuple_desc_->slots() which are materialized, in the same order
virtual Status Init(const TPlanNode &tnode)
virtual void Close(RuntimeState *state)
virtual Status Prepare(RuntimeState *state)
Status OpenCurrentChild(RuntimeState *state)
bool child_eos_
Saved from the last to GetNext() on the current child.
int tuple_id_
Tuple id resolved in Prepare() to set tuple_desc_;.
boost::scoped_ptr< RowBatch > child_row_batch_