| 42 | using internal::TaskGroup; |
| 43 | |
| 44 | void AssertBuilding(const std::shared_ptr<ChunkedArrayBuilder>& builder, |
| 45 | const std::vector<std::string>& chunks, |
| 46 | std::shared_ptr<ChunkedArray>* out) { |
| 47 | ArrayVector unconverted; |
| 48 | |
| 49 | auto options = ParseOptions::Defaults(); |
| 50 | for (const auto& chunk : chunks) { |
| 51 | std::shared_ptr<Array> parsed; |
| 52 | ASSERT_OK(ParseFromString(options, chunk, &parsed)); |
| 53 | unconverted.push_back(parsed); |
| 54 | } |
| 55 | |
| 56 | int64_t i = 0; |
| 57 | for (const auto& parsed : unconverted) { |
| 58 | builder->Insert(i, field("", parsed->type()), parsed); |
| 59 | ++i; |
| 60 | } |
| 61 | ASSERT_OK(builder->Finish(out)); |
| 62 | ASSERT_OK((*out)->ValidateFull()); |
| 63 | } |
| 64 | |
| 65 | std::shared_ptr<ChunkedArray> ExtractField(const std::string& name, |
| 66 | const ChunkedArray& columns) { |
no test coverage detected