Struct arrow::datatypes::IntervalDayTimeType
source · pub struct IntervalDayTimeType {}
Expand description
A “calendar” interval type in days and milliseconds.
§Representation
This type is stored as a single 64 bit integer, interpreted as two i32 fields:
- the number of elapsed days
- The number of milliseconds (no leap seconds),
┌──────────────┬──────────────┐
│ Days │ Milliseconds │
│ (32 bits) │ (32 bits) │
└──────────────┴──────────────┘
0 31 63 bit offset
Please see the Arrow Spec for more details
§Note on Comparing and Ordering for Calendar Types
Values of IntervalDayTimeType
are compared using their binary representation,
which can lead to surprising results. Please see the description of ordering on
IntervalMonthDayNanoType
for more details
Implementations§
source§impl IntervalDayTimeType
impl IntervalDayTimeType
sourcepub fn make_value(
days: i32,
millis: i32,
) -> <IntervalDayTimeType as ArrowPrimitiveType>::Native
pub fn make_value( days: i32, millis: i32, ) -> <IntervalDayTimeType as ArrowPrimitiveType>::Native
Creates a IntervalDayTimeType::Native
§Arguments
days
- The number of days (+/-) represented in this intervalmillis
- The number of milliseconds (+/-) represented in this interval
sourcepub fn to_parts(
i: <IntervalDayTimeType as ArrowPrimitiveType>::Native,
) -> (i32, i32)
pub fn to_parts( i: <IntervalDayTimeType as ArrowPrimitiveType>::Native, ) -> (i32, i32)
Turns a IntervalDayTimeType into a tuple of (days, milliseconds)
§Arguments
i
- The IntervalDayTimeType to convert
Trait Implementations§
source§impl ArrowPrimitiveType for IntervalDayTimeType
impl ArrowPrimitiveType for IntervalDayTimeType
source§fn get_byte_width() -> usize
fn get_byte_width() -> usize
Returns the byte width of this primitive type.
source§fn default_value() -> Self::Native
fn default_value() -> Self::Native
Returns a default value of this primitive type. Read more
Auto Trait Implementations§
impl Freeze for IntervalDayTimeType
impl RefUnwindSafe for IntervalDayTimeType
impl Send for IntervalDayTimeType
impl Sync for IntervalDayTimeType
impl Unpin for IntervalDayTimeType
impl UnwindSafe for IntervalDayTimeType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more