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

Method isEqual

matlab/src/cpp/arrow/matlab/type/proxy/type.cc:80–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void Type::isEqual(libmexclass::proxy::method::Context& context) {
81 namespace mda = ::matlab::data;
82
83 const mda::TypedArray<uint64_t> type_proxy_ids = context.inputs[0];
84
85 bool is_equal = true;
86 const auto check_metadata = false;
87 for (const auto& type_proxy_id : type_proxy_ids) {
88 // Retrieve the Type proxy from the ProxyManager
89 auto proxy = libmexclass::proxy::ProxyManager::getProxy(type_proxy_id);
90 auto type_proxy = std::static_pointer_cast<proxy::Type>(proxy);
91 auto type_to_compare = type_proxy->unwrap();
92
93 if (!data_type->Equals(type_to_compare, check_metadata)) {
94 is_equal = false;
95 break;
96 }
97 }
98 mda::ArrayFactory factory;
99 context.outputs[0] = factory.createScalar(is_equal);
100}
101} // namespace arrow::matlab::type::proxy

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected