| 76 | } |
| 77 | |
| 78 | void CheckSlice(std::shared_ptr<RecordBatch> batch, int start, int size) { |
| 79 | batch = batch->Slice(start, size); |
| 80 | ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatches({batch})); |
| 81 | |
| 82 | DoWrite(*table); |
| 83 | std::shared_ptr<Table> result; |
| 84 | ASSERT_OK(reader_->Read(&result)); |
| 85 | ASSERT_OK(result->ValidateFull()); |
| 86 | if (table->num_rows() > 0) { |
| 87 | AssertTablesEqual(*table, *result); |
| 88 | } else { |
| 89 | ASSERT_EQ(0, result->num_rows()); |
| 90 | ASSERT_TRUE(result->schema()->Equals(*table->schema())); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | void CheckSlices(std::shared_ptr<RecordBatch> batch) { |
| 95 | std::vector<int> starts = {0, 1, 300, 301, 302, 303, 304, 305, 306, 307}; |
nothing calls this directly
no test coverage detected