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

Method CreateRowBatch

be/src/exec/row-batch-list-test.cc:63–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 RowBatch* CreateRowBatch(int start, int end) {
64 int num_rows = end - start + 1;
65 RowBatch* batch = pool_.Add(new RowBatch(desc_, num_rows, &tracker_));
66 int32_t* tuple_mem = reinterpret_cast<int32_t*>(
67 batch->tuple_data_pool()->Allocate(sizeof(int32_t) * num_rows));
68
69 for (int i = start; i <= end; ++i) {
70 int idx = batch->AddRow();
71 TupleRow* row = batch->GetRow(idx);
72 *tuple_mem = i;
73 row->SetTuple(0, reinterpret_cast<Tuple*>(tuple_mem));
74
75 batch->CommitLastRow();
76 tuple_mem++;
77 }
78 return batch;
79 }
80
81 // Validate that row contains the expected value
82 void ValidateMatch(TupleRow* row, int32_t expected) {

Callers

nothing calls this directly

Calls 7

tuple_data_poolMethod · 0.80
CommitLastRowMethod · 0.80
AddMethod · 0.45
AllocateMethod · 0.45
AddRowMethod · 0.45
GetRowMethod · 0.45
SetTupleMethod · 0.45

Tested by

no test coverage detected