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

Method TimeUnit_multiplier

r/src/array_to_vector.cpp:968–982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966
967 private:
968 int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const {
969 // hms difftime is always "seconds", so multiply based on the Array's TimeUnit
970 switch (static_cast<unit_type*>(array->type().get())->unit()) {
971 case TimeUnit::SECOND:
972 return 1;
973 case TimeUnit::MILLI:
974 return 1000;
975 case TimeUnit::MICRO:
976 return 1000000;
977 case TimeUnit::NANO:
978 return 1000000000;
979 default:
980 return 0;
981 }
982 }
983};
984
985template <typename value_type, typename unit_type = DurationType>

Callers

nothing calls this directly

Calls 3

unitMethod · 0.45
getMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected