pub trait SchemaEvolvable: Send + Sync {
// Required methods
fn diff_schemas(
&self,
old: &SchemaRef,
new: &SchemaRef,
) -> Vec<SchemaChange>;
fn evaluate_evolution(&self, changes: &[SchemaChange]) -> EvolutionVerdict;
fn apply_evolution(
&self,
old: &SchemaRef,
changes: &[SchemaChange],
) -> SchemaResult<ColumnProjection>;
// Provided method
fn schema_version(&self) -> Option<u32> { ... }
}Expand description
A connector that supports schema evolution.
Provides diffing, evaluation, and application of schema changes.
Required Methods§
Sourcefn diff_schemas(&self, old: &SchemaRef, new: &SchemaRef) -> Vec<SchemaChange>
fn diff_schemas(&self, old: &SchemaRef, new: &SchemaRef) -> Vec<SchemaChange>
Computes the differences between two schemas.
Sourcefn evaluate_evolution(&self, changes: &[SchemaChange]) -> EvolutionVerdict
fn evaluate_evolution(&self, changes: &[SchemaChange]) -> EvolutionVerdict
Evaluates whether a set of schema changes is acceptable.
Sourcefn apply_evolution(
&self,
old: &SchemaRef,
changes: &[SchemaChange],
) -> SchemaResult<ColumnProjection>
fn apply_evolution( &self, old: &SchemaRef, changes: &[SchemaChange], ) -> SchemaResult<ColumnProjection>
Applies schema changes, returning a column projection that maps old data to the new schema.
§Errors
Returns a schema error if the evolution cannot be applied.
Provided Methods§
Sourcefn schema_version(&self) -> Option<u32>
fn schema_version(&self) -> Option<u32>
Returns the current schema version, if tracked.