1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//! Logical types for columns of time-of-day values.
//!
//! Each element is a time since midnight, without a date or timezone:
//! e.g. a [`Time64Nanosecond`] element is the number of nanoseconds since
//! midnight, as an `i64`. Stored as the [`arrow::array::Time32SecondArray`]
//! family ([`DataType::Time32`] /
//! [`DataType::Time64`]).
//!
//! Following arrow, the 32-bit variants cover second/millisecond resolution
//! and the 64-bit variants microsecond/nanosecond.
use ;
use ;
use crate;
/// Seconds since midnight, as an `i32`.
///
/// ```
/// use quiver::{Column, Time32Second};
///
/// let column = Column::<Time32Second>::from_values([3_600, 7_200]); // 01:00, 02:00
/// assert_eq!(column.value(0), 3_600);
/// ```
///
/// This type is never instantiated — it only appears as a type parameter.
;
/// Milliseconds since midnight, as an `i32`.
///
/// ```
/// use quiver::{Column, Time32Millisecond};
///
/// let column = Column::<Time32Millisecond>::from_values([3_600_000]); // 01:00
/// assert_eq!(column.value(0), 3_600_000);
/// ```
///
/// This type is never instantiated — it only appears as a type parameter.
;
/// Microseconds since midnight, as an `i64`.
///
/// ```
/// use quiver::{Column, Time64Microsecond};
///
/// let column = Column::<Time64Microsecond>::from_values([3_600_000_000_i64]); // 01:00
/// assert_eq!(column.value(0), 3_600_000_000);
/// ```
///
/// This type is never instantiated — it only appears as a type parameter.
;
/// Nanoseconds since midnight, as an `i64`.
///
/// ```
/// use quiver::{Column, Time64Nanosecond};
///
/// let column = Column::<Time64Nanosecond>::from_values([3_600_000_000_000_i64]); // 01:00
/// assert_eq!(column.value(0), 3_600_000_000_000);
/// ```
///
/// This type is never instantiated — it only appears as a type parameter.
;
impl_marker_datatype!;
impl_marker_datatype!;
impl_marker_datatype!;
impl_marker_datatype!;
impl_primitive_datatype!;
impl_primitive_datatype!;
impl_primitive_datatype!;
impl_primitive_datatype!;