Enum mz_persist::gen::persist::ProtoBatchFormat
source · #[repr(i32)]pub enum ProtoBatchFormat {
Unknown = 0,
ArrowKvtd = 1,
ParquetKvtd = 2,
}
Variants§
Unknown = 0
ArrowKvtd = 1
Arrow, which we’d use for the local blob cache if we use it, gets a
structure like [(K, V, T, D)]
so that we could mmap it and use it
directly as our in-mem batches (which have this structure).
ParquetKvtd = 2
We have more flexibility with Parquet. Initially we’ll start with the
same [(K, V, T, D)]
as our in-mem batches. Another option would be
something like [(K, [(V, [(T, D)])])]
, which would only store each
key’s and each val’s data once (this is similar to the
[differential_dataflow::trace::layers::Trie] structure of
[differential_dataflow::trace::implementations::ord::OrdValBatch]).
Which is better probably comes down to how much duplication we expect of keys and vals in a batch as well as how big the batches are (the trie structure introduces more columns, so has some amount of overhead).
For unsealed batches, we have a better chance of duplicates than trace,
but we probably don’t want to pay the cost of converting between the
in-mem [(K, V, T, D)]
representation and anything else (to keep the hot
path clean). Unsealed batches are also likely to be our smallest. For
this reason, they’ll probably always stay as ParquetKvtd.
For trace batches, we consolidate them before writing them out, so we’re guaranteed to get nothing from the V level of the trie. For duplicate keys, we’ll probably get a good amount of benefit from column specific compression, and I’d like to exhaust that direction first before dealing with a trie-like column structure.
Implementations§
source§impl ProtoBatchFormat
impl ProtoBatchFormat
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for ProtoBatchFormat
impl Clone for ProtoBatchFormat
source§fn clone(&self) -> ProtoBatchFormat
fn clone(&self) -> ProtoBatchFormat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtoBatchFormat
impl Debug for ProtoBatchFormat
source§impl Default for ProtoBatchFormat
impl Default for ProtoBatchFormat
source§fn default() -> ProtoBatchFormat
fn default() -> ProtoBatchFormat
source§impl From<ProtoBatchFormat> for i32
impl From<ProtoBatchFormat> for i32
source§fn from(value: ProtoBatchFormat) -> i32
fn from(value: ProtoBatchFormat) -> i32
source§impl Hash for ProtoBatchFormat
impl Hash for ProtoBatchFormat
source§impl Ord for ProtoBatchFormat
impl Ord for ProtoBatchFormat
source§fn cmp(&self, other: &ProtoBatchFormat) -> Ordering
fn cmp(&self, other: &ProtoBatchFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ProtoBatchFormat
impl PartialEq for ProtoBatchFormat
source§fn eq(&self, other: &ProtoBatchFormat) -> bool
fn eq(&self, other: &ProtoBatchFormat) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ProtoBatchFormat
impl PartialOrd for ProtoBatchFormat
source§fn partial_cmp(&self, other: &ProtoBatchFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &ProtoBatchFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ProtoBatchFormat
impl Eq for ProtoBatchFormat
impl StructuralPartialEq for ProtoBatchFormat
Auto Trait Implementations§
impl RefUnwindSafe for ProtoBatchFormat
impl Send for ProtoBatchFormat
impl Sync for ProtoBatchFormat
impl Unpin for ProtoBatchFormat
impl UnwindSafe for ProtoBatchFormat
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
source§fn copy_onto(
self,
target: &mut ConsecutiveOffsetPairs<R, O>
) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PreferredContainer for T
impl<T> PreferredContainer for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.