| 154 | }; |
| 155 | |
| 156 | TEST_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 |
nothing calls this directly
no test coverage detected