Skip to main content

SchemaRegistry

Trait SchemaRegistry 

Source
pub trait SchemaRegistry: Send + Sync {
    // Required methods
    fn get_schema(&self, name: &str) -> CatalogResult<TableSchema>;
    fn register_schema(&mut self, name: impl Into<String>, schema: TableSchema);
    fn schema_names(&self) -> Vec<String>;
}
Expand description

A registry that maps logical schema names to TableSchema definitions.

Used by connectors (e.g., Kafka Avro/Protobuf topics) to resolve the Arrow schema for a data stream at runtime without hard-coding field lists.

Required Methods§

Source

fn get_schema(&self, name: &str) -> CatalogResult<TableSchema>

Look up a schema by name.

Source

fn register_schema(&mut self, name: impl Into<String>, schema: TableSchema)

Register a schema under a name, replacing any existing entry.

Source

fn schema_names(&self) -> Vec<String>

Return all registered schema names.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§