| 51 | } |
| 52 | |
| 53 | Result<std::shared_ptr<RecordBatch>> MakeMapBatch() { |
| 54 | std::shared_ptr<Array> array; |
| 55 | const char* json_input = R"( |
| 56 | [ |
| 57 | [[0, 1], [1, 1], [2, 2], [3, 3], [4, 5], [5, 8]], |
| 58 | null, |
| 59 | [[0, null], [1, null], [2, 0], [3, 1], [4, null], [5, 2]], |
| 60 | [] |
| 61 | ] |
| 62 | )"; |
| 63 | ARROW_ASSIGN_OR_RAISE(array, ArrayFromJSONString(map(int16(), int32()), json_input)); |
| 64 | auto schema = ::arrow::schema({field("f0", array->type())}); |
| 65 | return RecordBatch::Make(schema, array->length(), {array}); |
| 66 | } |
| 67 | |
| 68 | Result<std::vector<std::shared_ptr<RecordBatch>>> Batches() { |
| 69 | std::vector<std::shared_ptr<RecordBatch>> batches; |
no test coverage detected