MCPcopy Create free account
hub / github.com/apache/arrow-rs / value_as_duration

Method value_as_duration

arrow-array/src/array/primitive_array.rs:1319–1321  ·  view source on GitHub ↗

Returns a value as a chrono `Duration` If a data type cannot be converted to `Duration`, a `None` is returned See notes on [`PrimitiveArray::value`] regarding nulls and panics

(&self, i: usize)

Source from the content-addressed store, hash-verified

1317 ///
1318 /// See notes on [`PrimitiveArray::value`] regarding nulls and panics
1319 pub fn value_as_duration(&self, i: usize) -> Option<Duration> {
1320 as_duration::<T>(i64::from(self.value(i)))
1321 }
1322}
1323
1324impl<T: ArrowPrimitiveType> std::fmt::Debug for PrimitiveArray<T> {

Callers

nothing calls this directly

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected