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

Method TimeUnit_multiplier

r/src/array_to_vector.cpp:1023–1037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1021
1022 private:
1023 int TimeUnit_multiplier(const std::shared_ptr<Array>& array) const {
1024 // difftime is always "seconds", so multiply based on the Array's TimeUnit
1025 switch (static_cast<unit_type*>(array->type().get())->unit()) {
1026 case TimeUnit::SECOND:
1027 return 1;
1028 case TimeUnit::MILLI:
1029 return 1000;
1030 case TimeUnit::MICRO:
1031 return 1000000;
1032 case TimeUnit::NANO:
1033 return 1000000000;
1034 default:
1035 return 0;
1036 }
1037 }
1038};
1039
1040template <typename value_type>

Callers

nothing calls this directly

Calls 3

unitMethod · 0.45
getMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected