Enum mz_persist::gen::persist::ProtoBatchFormat
source · #[repr(i32)]pub enum ProtoBatchFormat {
Unknown = 0,
ArrowKvtd = 1,
ParquetKvtd = 2,
ParquetStructured = 3,
}
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.
ParquetStructured = 3
Parquet format that understands the structure of the inner data. See the
metadata
field on ProtoBatchPartInline
for more information about
how this data is structured in Parquet.
For example, the initial use of this format will contain the columns
\[(K, V, T, D, K_S, V_S)\]
where K_S
and V_S
are structured versions
of the opaque data stored in K
and V
, respectively. Eventually we’ll
stop writing K
and V
and migrate entirely to K_S
and V_S
.
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§impl PartialOrd for ProtoBatchFormat
impl PartialOrd for ProtoBatchFormat
source§impl TryFrom<i32> for ProtoBatchFormat
impl TryFrom<i32> for ProtoBatchFormat
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<ProtoBatchFormat, UnknownEnumValue>
fn try_from(value: i32) -> Result<ProtoBatchFormat, UnknownEnumValue>
impl Copy for ProtoBatchFormat
impl Eq for ProtoBatchFormat
impl StructuralPartialEq for ProtoBatchFormat
Auto Trait Implementations§
impl Freeze for ProtoBatchFormat
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.