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

Method writeTable

matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_writer.cc:54–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void 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
70void RecordBatchWriter::close(libmexclass::proxy::method::Context& context) {
71 MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(writer->Close(), context,

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
WriteTableMethod · 0.45

Tested by

no test coverage detected