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

Method AcquireState

be/src/runtime/row-batch.cc:409–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void RowBatch::AcquireState(RowBatch* src) {
410 DCHECK(row_desc_->LayoutEquals(*src->row_desc_)) << row_desc_->DebugString() << "\n"
411 << src->row_desc_->DebugString();
412 DCHECK_EQ(num_tuples_per_row_, src->num_tuples_per_row_);
413 DCHECK_EQ(tuple_ptrs_size_, src->tuple_ptrs_size_);
414
415 // The destination row batch should be empty.
416 DCHECK(!needs_deep_copy_);
417 DCHECK_EQ(num_rows_, 0);
418 DCHECK_EQ(attached_buffer_bytes_, 0);
419
420 num_rows_ = src->num_rows_;
421 capacity_ = src->capacity_;
422 // tuple_ptrs_ were allocated with malloc so can be swapped between batches.
423 DCHECK(tuple_ptrs_info_.get() == nullptr);
424 std::swap(tuple_ptrs_, src->tuple_ptrs_);
425 src->TransferResourceOwnership(this);
426}
427
428void RowBatch::DeepCopyTo(RowBatch* dst) {
429 DCHECK(dst->row_desc_->Equals(*row_desc_));

Callers 4

GetNextInternalMethod · 0.80
SendMethod · 0.80
GetNextMethod · 0.80
TESTFunction · 0.80

Calls 4

getMethod · 0.65
LayoutEqualsMethod · 0.45
DebugStringMethod · 0.45

Tested by 1

TESTFunction · 0.64