pub struct ArrowSchemaModel {
pub events: Vec<ArrowEventSchema>,
}Expand description
Unified obs_events table schema. Used by ParquetSink to pre-
compute the file-level Arrow schema, by ClickHouseSink to emit the
CREATE TABLE DDL, and by obs migrate {parquet,clickhouse} for
CI-driven migrations. Spec 14 § 4 / KD5 + spec 22 § 1.
Fields§
§events: Vec<ArrowEventSchema>Per-event payload structs, sorted by full_name.
Implementations§
Source§impl ArrowSchemaModel
impl ArrowSchemaModel
Sourcepub fn from_schemas<'a, I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a (dyn EventSchemaErased + 'static)>,
pub fn from_schemas<'a, I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a (dyn EventSchemaErased + 'static)>,
Build the model by walking a sequence of schemas. Sorted output makes downstream codegen byte-identical across runs (spec 12 § 1.2).
Sourcepub fn lookup(&self, full_name: &str) -> Option<&ArrowEventSchema>
pub fn lookup(&self, full_name: &str) -> Option<&ArrowEventSchema>
Look up one event’s struct by full_name.
Trait Implementations§
Source§impl Clone for ArrowSchemaModel
impl Clone for ArrowSchemaModel
Source§fn clone(&self) -> ArrowSchemaModel
fn clone(&self) -> ArrowSchemaModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArrowSchemaModel
impl Debug for ArrowSchemaModel
Source§impl Default for ArrowSchemaModel
impl Default for ArrowSchemaModel
Source§fn default() -> ArrowSchemaModel
fn default() -> ArrowSchemaModel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ArrowSchemaModel
impl RefUnwindSafe for ArrowSchemaModel
impl Send for ArrowSchemaModel
impl Sync for ArrowSchemaModel
impl Unpin for ArrowSchemaModel
impl UnsafeUnpin for ArrowSchemaModel
impl UnwindSafe for ArrowSchemaModel
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