| 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) { |
nothing calls this directly
no test coverage detected