Struct datafusion_common::FunctionalDependence
source · pub struct FunctionalDependence {
pub source_indices: Vec<usize>,
pub target_indices: Vec<usize>,
pub nullable: bool,
pub mode: Dependency,
}
Expand description
This object defines a functional dependence in the schema. A functional dependence defines a relationship between determinant keys and dependent columns. A determinant key is a column, or a set of columns, whose value uniquely determines values of some other (dependent) columns. If two rows have the same determinant key, dependent columns in these rows are necessarily the same. If the determinant key is unique, the set of dependent columns is equal to the entire schema and the determinant key can serve as a primary key. Note that a primary key may “downgrade” into a determinant key due to an operation such as a join, and this object is used to track dependence relationships in such cases. For more information on functional dependencies, see: https://www.scaler.com/topics/dbms/functional-dependency-in-dbms/
Fields§
§source_indices: Vec<usize>
§target_indices: Vec<usize>
§nullable: bool
Flag indicating whether one of the source_indices
can receive NULL values.
For a data source, if the constraint in question is Constraint::Unique
,
this flag is true
. If the constraint in question is Constraint::PrimaryKey
,
this flag is false
.
Note that as the schema changes between different stages in a plan,
such as after LEFT JOIN or RIGHT JOIN operations, this property may
change.
mode: Dependency
Implementations§
Trait Implementations§
source§impl Clone for FunctionalDependence
impl Clone for FunctionalDependence
source§fn clone(&self) -> FunctionalDependence
fn clone(&self) -> FunctionalDependence
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FunctionalDependence
impl Debug for FunctionalDependence
source§impl PartialEq for FunctionalDependence
impl PartialEq for FunctionalDependence
impl Eq for FunctionalDependence
impl StructuralPartialEq for FunctionalDependence
Auto Trait Implementations§
impl Freeze for FunctionalDependence
impl RefUnwindSafe for FunctionalDependence
impl Send for FunctionalDependence
impl Sync for FunctionalDependence
impl Unpin for FunctionalDependence
impl UnwindSafe for FunctionalDependence
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<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.