pub struct PartitionKeyCodecV1 { /* private fields */ }Expand description
Vectorized encoder for the exact typed-key representation covered by
super::PARTITIONING_ABI_VERSION 2.
Floats, nested values, and run-end encoding remain fail-closed. Dictionary indices are physical representation: supported dictionaries encode their hydrated scalar values.
Implementations§
Source§impl PartitionKeyCodecV1
impl PartitionKeyCodecV1
Sourcepub fn try_new(
data_types: impl IntoIterator<Item = DataType>,
) -> Result<Self, PartitionKeyCodecError>
pub fn try_new( data_types: impl IntoIterator<Item = DataType>, ) -> Result<Self, PartitionKeyCodecError>
Construct a codec for one resolved, ordered composite-key schema.
§Errors
Returns the first unsupported key type or an Arrow row-layout error.
Sourcepub fn encode_columns(&self, columns: &[ArrayRef]) -> Result<Rows, ArrowError>
pub fn encode_columns(&self, columns: &[ArrayRef]) -> Result<Rows, ArrowError>
Encode all key columns in one vectorized Arrow-row pass.
The returned rows borrow no input buffers and can be hashed or copied into operator state. Column types and arity must match construction.
§Errors
Returns an Arrow error for a mismatched schema or column length.
Sourcepub fn hash_encoded(encoded: &[u8]) -> u64
pub fn hash_encoded(encoded: &[u8]) -> u64
Full ABI-v1 hash of one encoded key.
Sourcepub fn vnode_for_encoded(encoded: &[u8], vnode_count: NonZeroU32) -> u32
pub fn vnode_for_encoded(encoded: &[u8], vnode_count: NonZeroU32) -> u32
Map one encoded key into a nonempty vnode space.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PartitionKeyCodecV1
impl RefUnwindSafe for PartitionKeyCodecV1
impl Send for PartitionKeyCodecV1
impl Sync for PartitionKeyCodecV1
impl Unpin for PartitionKeyCodecV1
impl UnsafeUnpin for PartitionKeyCodecV1
impl UnwindSafe for PartitionKeyCodecV1
Blanket Implementations§
impl<T> Allocation for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.