pub trait SchemaExt {
// Required methods
fn equivalent_names_and_types(&self, other: &Self) -> bool;
fn logically_equivalent_names_and_types(
&self,
other: &Self,
) -> Result<(), DataFusionError>;
}
Expand description
DataFusion-specific extensions to Schema
.
Required Methods§
Sourcefn equivalent_names_and_types(&self, other: &Self) -> bool
fn equivalent_names_and_types(&self, other: &Self) -> bool
This is a specialized version of Eq that ignores differences in nullability and metadata.
It works the same as DFSchema::equivalent_names_and_types
.
Sourcefn logically_equivalent_names_and_types(
&self,
other: &Self,
) -> Result<(), DataFusionError>
fn logically_equivalent_names_and_types( &self, other: &Self, ) -> Result<(), DataFusionError>
Returns nothing if the two schemas have the same qualified named fields with logically equivalent data types. Returns internal error otherwise.
Use DFSchema::equivalent_names_and_types for stricter semantic type equivalence checking.
It is only used by insert into cases.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.