| 167 | } |
| 168 | |
| 169 | TEST_P(TestFeather, ReadIndicesOrNames) { |
| 170 | std::shared_ptr<RecordBatch> batch1; |
| 171 | ASSERT_OK(ipc::test::MakeIntRecordBatch(&batch1)); |
| 172 | |
| 173 | ASSERT_OK_AND_ASSIGN(auto table, Table::FromRecordBatches({batch1})); |
| 174 | |
| 175 | DoWrite(*table); |
| 176 | |
| 177 | // int32 type is at the column f4 of the result of MakeIntRecordBatch |
| 178 | auto expected = Table::Make(schema({field("f4", int32())}), {batch1->column(4)}); |
| 179 | |
| 180 | std::shared_ptr<Table> result1, result2; |
| 181 | |
| 182 | std::vector<int> indices = {4}; |
| 183 | ASSERT_OK(reader_->Read(indices, &result1)); |
| 184 | AssertTablesEqual(*expected, *result1); |
| 185 | |
| 186 | std::vector<std::string> names = {"f4"}; |
| 187 | ASSERT_OK(reader_->Read(names, &result2)); |
| 188 | AssertTablesEqual(*expected, *result2); |
| 189 | } |
| 190 | |
| 191 | TEST_P(TestFeather, EmptyTable) { |
| 192 | std::vector<std::shared_ptr<ChunkedArray>> columns; |
nothing calls this directly
no test coverage detected