pub struct Int96 {
value: [u32; 3],
}
Expand description
Rust representation for logical type INT96, value is backed by an array of u32
.
The type only takes 12 bytes, without extra padding.
Fields§
§value: [u32; 3]
Implementations§
Source§impl Int96
impl Int96
Sourcepub fn to_seconds(&self) -> i64
pub fn to_seconds(&self) -> i64
Converts this INT96 into an i64 representing the number of SECONDS since EPOCH
Will wrap around on overflow
Sourcepub fn to_millis(&self) -> i64
pub fn to_millis(&self) -> i64
Converts this INT96 into an i64 representing the number of MILLISECONDS since EPOCH
Will wrap around on overflow
Sourcepub fn to_micros(&self) -> i64
pub fn to_micros(&self) -> i64
Converts this INT96 into an i64 representing the number of MICROSECONDS since EPOCH
Will wrap around on overflow
Sourcepub fn to_nanos(&self) -> i64
pub fn to_nanos(&self) -> i64
Converts this INT96 into an i64 representing the number of NANOSECONDS since EPOCH
Will wrap around on overflow
fn get_days(&self) -> i32
fn get_nanos(&self) -> i64
fn data_as_days_and_nanos(&self) -> (i32, i64)
Trait Implementations§
Source§impl MakeStatistics for Int96
impl MakeStatistics for Int96
fn make_statistics(statistics: ValueStatistics<Self>) -> Statisticswhere
Self: Sized,
Source§impl Ord for Int96
impl Ord for Int96
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Order Int96
correctly for (deprecated) timestamp types.
Note: this is done even though the Int96 type is deprecated and the spec does not define the sort order because some engines, notably Spark and Databricks Photon still write Int96 timestamps and rely on their order for optimization.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParquetValueType for Int96
impl ParquetValueType for Int96
const PHYSICAL_TYPE: Type = Type::INT96
Source§fn encode<W: Write>(
values: &[Self],
writer: &mut W,
_: &mut BitWriter,
) -> Result<()>
fn encode<W: Write>( values: &[Self], writer: &mut W, _: &mut BitWriter, ) -> Result<()>
Source§fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
Source§fn decode(
buffer: &mut [Self],
decoder: &mut PlainDecoderDetails,
) -> Result<usize>
fn decode( buffer: &mut [Self], decoder: &mut PlainDecoderDetails, ) -> Result<usize>
fn skip(decoder: &mut PlainDecoderDetails, num_values: usize) -> Result<usize>
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Source§fn dict_encoding_size(&self) -> (usize, usize)
fn dict_encoding_size(&self) -> (usize, usize)
Source§fn variable_length_bytes(_: &[Self]) -> Option<i64>
fn variable_length_bytes(_: &[Self]) -> Option<i64>
Source§fn set_from_bytes(&mut self, _data: Bytes)
fn set_from_bytes(&mut self, _data: Bytes)
Bytes
] Read moreSource§impl PartialOrd for Int96
impl PartialOrd for Int96
Source§impl SliceAsBytes for Int96
impl SliceAsBytes for Int96
impl Copy for Int96
impl Eq for Int96
impl StructuralPartialEq for Int96
Auto Trait Implementations§
impl Freeze for Int96
impl RefUnwindSafe for Int96
impl Send for Int96
impl Sync for Int96
impl Unpin for Int96
impl UnwindSafe for Int96
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more