| 282 | } |
| 283 | |
| 284 | Status UnionNode::GetNextConst(RuntimeState* state, RowBatch* row_batch) { |
| 285 | DCHECK(state->instance_ctx().per_fragment_instance_idx == 0 || IsInSubplan()); |
| 286 | DCHECK_LT(const_exprs_lists_idx_, const_expr_evals_lists_.size()); |
| 287 | // Create new tuple buffer for row_batch. |
| 288 | int64_t tuple_buf_size; |
| 289 | uint8_t* tuple_buf; |
| 290 | RETURN_IF_ERROR( |
| 291 | row_batch->ResizeAndAllocateTupleBuffer(state, &tuple_buf_size, &tuple_buf)); |
| 292 | memset(tuple_buf, 0, tuple_buf_size); |
| 293 | |
| 294 | while (const_exprs_lists_idx_ < const_exprs_lists_.size() && !row_batch->AtCapacity()) { |
| 295 | MaterializeExprs( |
| 296 | const_expr_evals_lists_[const_exprs_lists_idx_], nullptr, tuple_buf, row_batch); |
| 297 | tuple_buf += tuple_desc_->byte_size(); |
| 298 | ++const_exprs_lists_idx_; |
| 299 | } |
| 300 | |
| 301 | return Status::OK(); |
| 302 | } |
| 303 | |
| 304 | Status UnionNode::GetNext(RuntimeState* state, RowBatch* row_batch, bool* eos) { |
| 305 | SCOPED_TIMER(runtime_profile_->total_time_counter()); |
nothing calls this directly
no test coverage detected