| 85 | } |
| 86 | |
| 87 | unique_ptr<RowBatch> CreateBatch(int size = 10) { |
| 88 | unique_ptr<RowBatch> batch = |
| 89 | make_unique<RowBatch>(nullable_row_desc(), size, tracker()); |
| 90 | batch->AddRows(size); |
| 91 | for (int i = 0; i < size; i++) { |
| 92 | TupleRow* row = batch->GetRow(i); |
| 93 | Tuple* tuple_mem = Tuple::Create(sizeof(char) + sizeof(int32_t), mem_pool()); |
| 94 | *reinterpret_cast<int32_t *>(tuple_mem->GetSlot(1)) = i; |
| 95 | tuple_mem->SetNotNull(NullIndicatorOffset(0, 1)); |
| 96 | row->SetTuple(0, tuple_mem); |
| 97 | } |
| 98 | batch->CommitRows(size); |
| 99 | return batch; |
| 100 | } |
| 101 | |
| 102 | MemTracker* tracker() { return &tracker_; } |
| 103 |
nothing calls this directly
no test coverage detected