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

Function TEST_P

cpp/src/arrow/dataset/file_csv_test.cc:156–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154};
155
156TEST_P(TestCsvFileFormat, BOMQuoteInHeader) {
157 // ARROW-17382: quoted headers after a BOM should be parsed correctly
158 auto source = GetFileSource("\xef\xbb\xbf\"ab\",\"cd\"\nef,gh\nij,kl\n");
159 auto fields = {field("ab", utf8()), field("cd", utf8())};
160 SetSchema(fields);
161 auto fragment = MakeFragment(*source);
162
163 int64_t row_count = 0;
164
165 for (auto maybe_batch : Batches(fragment)) {
166 ASSERT_OK_AND_ASSIGN(auto batch, maybe_batch);
167 AssertSchemaEqual(batch->schema(), schema(fields));
168 row_count += batch->num_rows();
169 }
170
171 ASSERT_EQ(row_count, 2);
172}
173
174// Basic scanning tests (to exercise compression support); see the parameterized test
175// below for more comprehensive testing of scan behaviors

Callers

nothing calls this directly

Calls 15

equalFunction · 0.85
field_refFunction · 0.85
GetColumnByNameMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.70
fieldFunction · 0.50
BatchesFunction · 0.50
schemaFunction · 0.50
SchemaClass · 0.50
OKFunction · 0.50
schemaMethod · 0.45
num_rowsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected