pub struct FsstArray { /* private fields */ }Expand description
In-memory FSST dictionary buffer that bundles compressed bytes, compact offsets, and the compressor needed to (de)compress values.
Implementations§
Source§impl FsstArray
impl FsstArray
Sourcepub fn train_compressor<'a>(input: impl Iterator<Item = &'a [u8]>) -> Compressor
pub fn train_compressor<'a>(input: impl Iterator<Item = &'a [u8]>) -> Compressor
Trains a compressor on a sequence of strings.
Sourcepub fn from_byte_array_with_compressor<T: ByteArrayType>(
input: &GenericByteArray<T>,
compressor: Arc<Compressor>,
) -> Self
pub fn from_byte_array_with_compressor<T: ByteArrayType>( input: &GenericByteArray<T>, compressor: Arc<Compressor>, ) -> Self
Creates a new FSST buffer from a GenericByteArray and a compressor.
Sourcepub fn from_decimal128_array_with_compressor(
array: &Decimal128Array,
compressor: Arc<Compressor>,
) -> Self
pub fn from_decimal128_array_with_compressor( array: &Decimal128Array, compressor: Arc<Compressor>, ) -> Self
Creates a new FSST buffer from a Decimal128Array and a compressor.
Sourcepub fn from_decimal256_array_with_compressor(
array: &Decimal256Array,
compressor: Arc<Compressor>,
) -> Self
pub fn from_decimal256_array_with_compressor( array: &Decimal256Array, compressor: Arc<Compressor>, ) -> Self
Creates a new FSST buffer from a Decimal256Array and a compressor.
Sourcepub fn uncompressed_bytes(&self) -> usize
pub fn uncompressed_bytes(&self) -> usize
Returns the uncompressed byte size of this buffer.
Sourcepub fn get_array_memory_size(&self) -> usize
pub fn get_array_memory_size(&self) -> usize
Returns the in-memory size of this buffer.
Sourcepub fn decompressor(&self) -> Decompressor<'_>
pub fn decompressor(&self) -> Decompressor<'_>
Returns a decompressor for this buffer.
Sourcepub fn compressor(&self) -> &Compressor
pub fn compressor(&self) -> &Compressor
Returns a reference to the compressor.
Sourcepub fn compressor_arc(&self) -> Arc<Compressor>
pub fn compressor_arc(&self) -> Arc<Compressor>
Returns a clone of the shared compressor.
Sourcepub fn to_bytes(&self, out: &mut Vec<u8>)
pub fn to_bytes(&self, out: &mut Vec<u8>)
Serializes this FSST buffer (raw bytes + compact offsets) to out.
Sourcepub fn from_bytes(bytes: Bytes, compressor: Arc<Compressor>) -> Self
pub fn from_bytes(bytes: Bytes, compressor: Arc<Compressor>) -> Self
Deserializes a FSST buffer from the to_bytes() format.
Sourcepub fn to_arrow_byte_array<T: ByteArrayType<Offset = i32>>(
&self,
) -> GenericByteArray<T>
pub fn to_arrow_byte_array<T: ByteArrayType<Offset = i32>>( &self, ) -> GenericByteArray<T>
Decompress all values into an Arrow byte array.
Sourcepub fn to_decimal128_array(
&self,
data_type: &ArrowFixedLenByteArrayType,
) -> Decimal128Array
pub fn to_decimal128_array( &self, data_type: &ArrowFixedLenByteArrayType, ) -> Decimal128Array
Converts this FSST buffer to a Decimal128Array.
Sourcepub fn to_decimal256_array(
&self,
data_type: &ArrowFixedLenByteArrayType,
) -> Decimal256Array
pub fn to_decimal256_array( &self, data_type: &ArrowFixedLenByteArrayType, ) -> Decimal256Array
Converts this FSST buffer to a Decimal256Array.
Source§impl FsstArray
impl FsstArray
Sourcepub fn to_uncompressed_selected(
&self,
selected: &[usize],
) -> (Buffer, OffsetBuffer<i32>)
pub fn to_uncompressed_selected( &self, selected: &[usize], ) -> (Buffer, OffsetBuffer<i32>)
Decompress the selected values into a buffer.
Trait Implementations§
Source§impl FsstBacking for FsstArray
impl FsstBacking for FsstArray
Source§fn uncompressed_bytes(&self) -> usize
fn uncompressed_bytes(&self) -> usize
Source§fn get_array_memory_size(&self) -> usize
fn get_array_memory_size(&self) -> usize
Auto Trait Implementations§
impl Freeze for FsstArray
impl RefUnwindSafe for FsstArray
impl Send for FsstArray
impl Sync for FsstArray
impl Unpin for FsstArray
impl UnsafeUnpin for FsstArray
impl UnwindSafe for FsstArray
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request