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

Method CreateRowBatch

be/src/runtime/data-stream-test.cc:417–429  ·  view source on GitHub ↗

Create batch_, but don't fill it with data yet. Assumes we created row_desc_.

Source from the content-addressed store, hash-verified

415
416 // Create batch_, but don't fill it with data yet. Assumes we created row_desc_.
417 RowBatch* CreateRowBatch() {
418 RowBatch* batch = new RowBatch(row_desc_, BATCH_CAPACITY, &tracker_);
419 int64_t* tuple_mem = reinterpret_cast<int64_t*>(
420 batch->tuple_data_pool()->Allocate(BATCH_CAPACITY * PER_ROW_DATA));
421 bzero(tuple_mem, BATCH_CAPACITY * PER_ROW_DATA);
422 for (int i = 0; i < BATCH_CAPACITY; ++i) {
423 int idx = batch->AddRow();
424 TupleRow* row = batch->GetRow(idx);
425 row->SetTuple(0, reinterpret_cast<Tuple*>(&tuple_mem[i]));
426 batch->CommitLastRow();
427 }
428 return batch;
429 }
430
431 void GetNextBatch(RowBatch* batch, int* next_val) {
432 for (int i = 0; i < BATCH_CAPACITY; ++i) {

Callers

nothing calls this directly

Calls 7

bzeroFunction · 0.85
tuple_data_poolMethod · 0.80
CommitLastRowMethod · 0.80
AllocateMethod · 0.45
AddRowMethod · 0.45
GetRowMethod · 0.45
SetTupleMethod · 0.45

Tested by

no test coverage detected