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

Method getDateUnit

matlab/src/cpp/arrow/matlab/type/proxy/date_type.cc:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void DateType::getDateUnit(libmexclass::proxy::method::Context& context) {
28 namespace mda = ::matlab::data;
29 mda::ArrayFactory factory;
30
31 auto date_type = std::static_pointer_cast<arrow::DateType>(data_type);
32 const auto date_unit = date_type->unit();
33 // Cast to uint8_t since there are only two supported DateUnit enumeration values:
34 // Day and Millisecond
35 auto date_unit_mda = factory.createScalar(static_cast<uint8_t>(date_unit));
36 context.outputs[0] = date_unit_mda;
37}
38} // namespace arrow::matlab::type::proxy

Callers

nothing calls this directly

Calls 1

unitMethod · 0.45

Tested by

no test coverage detected