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

Method getTimeUnit

matlab/src/cpp/arrow/matlab/type/proxy/time_type.cc:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void TimeType::getTimeUnit(libmexclass::proxy::method::Context& context) {
32 namespace mda = ::matlab::data;
33 mda::ArrayFactory factory;
34
35 auto time_type = std::static_pointer_cast<arrow::TimeType>(data_type);
36 const auto time_unit = time_type->unit();
37 // Cast to uint8_t since there are only four supported TimeUnit enumeration values:
38 // Nanosecond, Microsecond, Millisecond, Second
39 auto timeunit_mda = factory.createScalar(static_cast<uint8_t>(time_unit));
40 context.outputs[0] = timeunit_mda;
41}
42
43template <typename ArrowType>
44libmexclass::proxy::MakeResult make_time_type(

Callers

nothing calls this directly

Calls 1

unitMethod · 0.45

Tested by

no test coverage detected