#[repr(transparent)]pub struct FixedLenByteArray(ByteArray);
Expand description
Wrapper type for performance reasons, this represents FIXED_LEN_BYTE_ARRAY
but in all other
considerations behaves the same as ByteArray
§Performance notes:
This type is a little unfortunate, without it the compiler generates code that takes quite a
big hit on the CPU pipeline. Essentially the previous version stalls awaiting the result of
T::get_physical_type() == Type::FIXED_LEN_BYTE_ARRAY
.
Its debatable if this is wanted, it is out of spec for what parquet documents as its base types, although there are code paths in the Rust (and potentially the C++) versions that warrant this.
With this wrapper type the compiler generates more targeted code paths matching the higher level logical types, removing the data-hazard from all decoding and encoding paths.
Tuple Fields§
§0: ByteArray
Methods from Deref<Target = ByteArray>§
Trait Implementations§
Source§impl AsBytes for FixedLenByteArray
impl AsBytes for FixedLenByteArray
Source§impl AsRef<[u8]> for FixedLenByteArray
impl AsRef<[u8]> for FixedLenByteArray
Source§impl Clone for FixedLenByteArray
impl Clone for FixedLenByteArray
Source§fn clone(&self) -> FixedLenByteArray
fn clone(&self) -> FixedLenByteArray
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FixedLenByteArray
impl Debug for FixedLenByteArray
Source§impl Default for FixedLenByteArray
impl Default for FixedLenByteArray
Source§fn default() -> FixedLenByteArray
fn default() -> FixedLenByteArray
Returns the “default value” for a type. Read more
Source§impl Deref for FixedLenByteArray
impl Deref for FixedLenByteArray
Source§impl DerefMut for FixedLenByteArray
impl DerefMut for FixedLenByteArray
Source§impl Display for FixedLenByteArray
impl Display for FixedLenByteArray
Source§impl From<ByteArray> for FixedLenByteArray
impl From<ByteArray> for FixedLenByteArray
Source§impl From<FixedLenByteArray> for ByteArray
impl From<FixedLenByteArray> for ByteArray
Source§fn from(other: FixedLenByteArray) -> Self
fn from(other: FixedLenByteArray) -> Self
Converts to this type from the input type.
Source§impl HeapSize for FixedLenByteArray
impl HeapSize for FixedLenByteArray
Source§impl MakeStatistics for FixedLenByteArray
impl MakeStatistics for FixedLenByteArray
fn make_statistics(statistics: ValueStatistics<Self>) -> Statisticswhere
Self: Sized,
Source§impl ParquetValueType for FixedLenByteArray
impl ParquetValueType for FixedLenByteArray
const PHYSICAL_TYPE: Type = Type::FIXED_LEN_BYTE_ARRAY
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<()>
Encode the value directly from a higher level encoder
Source§fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
Establish the data that will be decoded in a buffer
Source§fn decode(
buffer: &mut [Self],
decoder: &mut PlainDecoderDetails,
) -> Result<usize>
fn decode( buffer: &mut [Self], decoder: &mut PlainDecoderDetails, ) -> Result<usize>
Decode the value from a given buffer for a higher level decoder
fn skip(decoder: &mut PlainDecoderDetails, num_values: usize) -> Result<usize>
Source§fn dict_encoding_size(&self) -> (usize, usize)
fn dict_encoding_size(&self) -> (usize, usize)
Return the encoded size for a type
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Return the value as an Any to allow for downcasts without transmutation
Source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Return the value as an mutable Any to allow for downcasts without transmutation
Source§fn set_from_bytes(&mut self, data: Bytes)
fn set_from_bytes(&mut self, data: Bytes)
Sets the value of this object from the provided [
Bytes
] Read moreSource§impl PartialEq<ByteArray> for FixedLenByteArray
impl PartialEq<ByteArray> for FixedLenByteArray
Source§impl PartialEq<FixedLenByteArray> for ByteArray
impl PartialEq<FixedLenByteArray> for ByteArray
Source§impl PartialEq for FixedLenByteArray
impl PartialEq for FixedLenByteArray
Source§impl PartialOrd<ByteArray> for FixedLenByteArray
impl PartialOrd<ByteArray> for FixedLenByteArray
Source§impl PartialOrd<FixedLenByteArray> for ByteArray
impl PartialOrd<FixedLenByteArray> for ByteArray
Source§impl PartialOrd for FixedLenByteArray
impl PartialOrd for FixedLenByteArray
Source§impl SliceAsBytes for FixedLenByteArray
impl SliceAsBytes for FixedLenByteArray
Auto Trait Implementations§
impl !Freeze for FixedLenByteArray
impl RefUnwindSafe for FixedLenByteArray
impl Send for FixedLenByteArray
impl Sync for FixedLenByteArray
impl Unpin for FixedLenByteArray
impl UnwindSafe for FixedLenByteArray
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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