| 426 | } |
| 427 | |
| 428 | void RowBatch::DeepCopyTo(RowBatch* dst) { |
| 429 | DCHECK(dst->row_desc_->Equals(*row_desc_)); |
| 430 | DCHECK_EQ(dst->num_rows_, 0); |
| 431 | DCHECK_GE(dst->capacity_, num_rows_); |
| 432 | dst->AddRows(num_rows_); |
| 433 | for (int i = 0; i < num_rows_; ++i) { |
| 434 | TupleRow* src_row = GetRow(i); |
| 435 | TupleRow* dst_row = reinterpret_cast<TupleRow*>(dst->tuple_ptrs_ + |
| 436 | i * num_tuples_per_row_); |
| 437 | src_row->DeepCopy( |
| 438 | dst_row, row_desc_->tuple_descriptors(), &dst->tuple_data_pool_, false); |
| 439 | } |
| 440 | dst->CommitRows(num_rows_); |
| 441 | } |
| 442 | |
| 443 | // TODO: consider computing size of batches as they are built up |
| 444 | int64_t RowBatch::TotalByteSize(DedupMap* distinct_tuples) { |
no test coverage detected