| 399 | } |
| 400 | |
| 401 | std::shared_ptr<RecordBatch> RecordBatchFromJSON(const std::shared_ptr<Schema>& schema, |
| 402 | std::string_view json) { |
| 403 | // Parse as a StructArray |
| 404 | auto struct_type = struct_(schema->fields()); |
| 405 | std::shared_ptr<Array> struct_array = arrow::ArrayFromJSON(struct_type, json); |
| 406 | |
| 407 | // Convert StructArray to RecordBatch |
| 408 | return *RecordBatch::FromStructArray(struct_array); |
| 409 | } |
| 410 | |
| 411 | std::shared_ptr<Scalar> ScalarFromJSON(const std::shared_ptr<DataType>& type, |
| 412 | std::string_view json) { |
no test coverage detected