1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use super::*;
use crate::prelude::*;
pub type DurationChunked = Logical<DurationType, Int64Type>;
impl Int64Chunked {
    pub fn into_duration(self, timeunit: TimeUnit) -> DurationChunked {
        let mut dt = DurationChunked::new(self);
        dt.2 = Some(DataType::Duration(timeunit));
        dt
    }
}
impl LogicalType for DurationChunked {
    fn dtype(&self) -> &DataType {
        self.2.as_ref().unwrap()
    }
    #[cfg(feature = "dtype-duration")]
    fn get_any_value(&self, i: usize) -> AnyValue<'_> {
        self.0.get_any_value(i).into_duration(self.time_unit())
    }
}