| 52 | } |
| 53 | |
| 54 | void RecordBatchWriter::writeTable(libmexclass::proxy::method::Context& context) { |
| 55 | namespace mda = ::matlab::data; |
| 56 | using TableProxy = ::arrow::matlab::tabular::proxy::Table; |
| 57 | |
| 58 | mda::StructArray opts = context.inputs[0]; |
| 59 | const mda::TypedArray<uint64_t> table_proxy_id_mda = opts[0]["TableProxyID"]; |
| 60 | const uint64_t table_proxy_id = table_proxy_id_mda[0]; |
| 61 | |
| 62 | auto proxy = libmexclass::proxy::ProxyManager::getProxy(table_proxy_id); |
| 63 | auto table_proxy = std::static_pointer_cast<TableProxy>(proxy); |
| 64 | auto table = table_proxy->unwrap(); |
| 65 | |
| 66 | MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(writer->WriteTable(*table), context, |
| 67 | error::IPC_RECORD_BATCH_WRITE_FAILED); |
| 68 | } |
| 69 | |
| 70 | void RecordBatchWriter::close(libmexclass::proxy::method::Context& context) { |
| 71 | MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(writer->Close(), context, |
nothing calls this directly
no test coverage detected