MCPcopy Create free account
hub / github.com/apache/arrow / AssertDatasetHasSchema

Function AssertDatasetHasSchema

cpp/src/arrow/dataset/test_util_internal.h:148–154  ·  view source on GitHub ↗

\brief Assert a dataset produces data with the schema

Source from the content-addressed store, hash-verified

146
147/// \brief Assert a dataset produces data with the schema
148inline 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
156class FileSourceFixtureMixin : public ::testing::Test {
157 public:

Callers 2

TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls 1

schemaMethod · 0.45

Tested by

no test coverage detected