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

Method getTimeUnit

matlab/src/cpp/arrow/matlab/type/proxy/timestamp_type.cc:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void TimestampType::getTimeUnit(libmexclass::proxy::method::Context& context) {
74 namespace mda = ::matlab::data;
75 mda::ArrayFactory factory;
76
77 auto timestamp_type = std::static_pointer_cast<arrow::TimestampType>(data_type);
78 const auto timeunit = timestamp_type->unit();
79 auto timeunit_mda = factory.createScalar(static_cast<int16_t>(timeunit));
80 context.outputs[0] = timeunit_mda;
81}
82} // namespace arrow::matlab::type::proxy

Callers

nothing calls this directly

Calls 1

unitMethod · 0.45

Tested by

no test coverage detected