MCPcopy Create free account
hub / github.com/apache/arrow / exportToC

Method exportToC

matlab/src/cpp/arrow/matlab/tabular/proxy/record_batch.cc:241–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void 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

Callers

nothing calls this directly

Calls 1

ExportRecordBatchFunction · 0.50

Tested by

no test coverage detected