| 63 | } |
| 64 | |
| 65 | std::shared_ptr<ChunkedArray> ExtractField(const std::string& name, |
| 66 | const ChunkedArray& columns) { |
| 67 | auto chunks = columns.chunks(); |
| 68 | for (auto& chunk : chunks) { |
| 69 | chunk = checked_cast<const StructArray&>(*chunk).GetFieldByName(name); |
| 70 | } |
| 71 | const auto& struct_type = checked_cast<const StructType&>(*columns.type()); |
| 72 | return std::make_shared<ChunkedArray>(chunks, struct_type.GetFieldByName(name)->type()); |
| 73 | } |
| 74 | |
| 75 | void AssertFieldEqual(const std::vector<std::string>& path, |
| 76 | const std::shared_ptr<ChunkedArray>& columns, |
no test coverage detected