| 239 | } |
| 240 | |
| 241 | void RecordBatch::exportToC(libmexclass::proxy::method::Context& context) { |
| 242 | namespace mda = ::matlab::data; |
| 243 | mda::StructArray opts = context.inputs[0]; |
| 244 | const mda::TypedArray<uint64_t> array_address_mda = opts[0]["ArrowArrayAddress"]; |
| 245 | const mda::TypedArray<uint64_t> schema_address_mda = opts[0]["ArrowSchemaAddress"]; |
| 246 | |
| 247 | auto arrow_array = reinterpret_cast<struct ArrowArray*>(uint64_t(array_address_mda[0])); |
| 248 | auto arrow_schema = |
| 249 | reinterpret_cast<struct ArrowSchema*>(uint64_t(schema_address_mda[0])); |
| 250 | |
| 251 | MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT( |
| 252 | arrow::ExportRecordBatch(*record_batch, arrow_array, arrow_schema), context, |
| 253 | error::C_EXPORT_FAILED); |
| 254 | } |
| 255 | |
| 256 | } // namespace arrow::matlab::tabular::proxy |
nothing calls this directly
no test coverage detected