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

Method make

matlab/src/cpp/arrow/matlab/tabular/proxy/schema.cc:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39libmexclass::proxy::MakeResult Schema::make(
40 const libmexclass::proxy::FunctionArguments& constructor_arguments) {
41 namespace mda = ::matlab::data;
42 using SchemaProxy = arrow::matlab::tabular::proxy::Schema;
43
44 mda::StructArray args = constructor_arguments[0];
45 const mda::TypedArray<uint64_t> field_proxy_ids_mda = args[0]["FieldProxyIDs"];
46
47 std::vector<std::shared_ptr<arrow::Field>> fields;
48 for (const auto proxy_id : field_proxy_ids_mda) {
49 using namespace libmexclass::proxy;
50 auto proxy = std::static_pointer_cast<arrow::matlab::type::proxy::Field>(
51 ProxyManager::getProxy(proxy_id));
52 auto field = proxy->unwrap();
53 fields.push_back(field);
54 }
55 auto schema = arrow::schema(fields);
56 return std::make_shared<SchemaProxy>(std::move(schema));
57}
58
59std::shared_ptr<arrow::Schema> Schema::unwrap() { return schema; }
60

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
schemaFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected