MCPcopy Create free account
hub / github.com/apache/impala / GetNextConst

Method GetNextConst

be/src/exec/union-node.cc:284–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284Status 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
304Status UnionNode::GetNext(RuntimeState* state, RowBatch* row_batch, bool* eos) {
305 SCOPED_TIMER(runtime_profile_->total_time_counter());

Callers

nothing calls this directly

Calls 5

OKFunction · 0.85
sizeMethod · 0.45
AtCapacityMethod · 0.45
byte_sizeMethod · 0.45

Tested by

no test coverage detected