\brief Assert a dataset produces data with the schema
| 146 | |
| 147 | /// \brief Assert a dataset produces data with the schema |
| 148 | inline void AssertDatasetHasSchema(std::shared_ptr<Dataset> ds, |
| 149 | std::shared_ptr<Schema> schema) { |
| 150 | ASSERT_OK_AND_ASSIGN(auto scanner_builder, ds->NewScan()); |
| 151 | ASSERT_OK_AND_ASSIGN(auto scanner, scanner_builder->Finish()); |
| 152 | ASSERT_OK_AND_ASSIGN(auto table, scanner->ToTable()); |
| 153 | ASSERT_EQ(*table->schema(), *schema); |
| 154 | } |
| 155 | |
| 156 | class FileSourceFixtureMixin : public ::testing::Test { |
| 157 | public: |