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<FunctionalDependence> for FunctionalDependence
impl PartialEq<FunctionalDependence> for FunctionalDependence
source§fn eq(&self, other: &FunctionalDependence) -> bool
fn eq(&self, other: &FunctionalDependence) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for FunctionalDependence
impl StructuralEq for FunctionalDependence
impl StructuralPartialEq for FunctionalDependence
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.