Module functional_dependencies

Module functional_dependencies 

Source
Expand description

FunctionalDependencies keeps track of functional dependencies inside DFSchema.

Structs§

Constraints
This object encapsulates a list of functional constraints:
FunctionalDependence
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/
FunctionalDependencies
This object encapsulates all functional dependencies in a given relation.

Enums§

Constraint
This object defines a constraint on a table.
Dependency
Describes functional dependency mode.

Functions§

add_offset_to_vec 🔒
Adds offset value to each entry inside in_data.
aggregate_functional_dependencies
Calculates functional dependencies for aggregate output, when there is a GROUP BY expression.
get_required_group_by_exprs_indices
Returns indices for the minimal subset of GROUP BY expressions that are functionally equivalent to the original set of GROUP BY expressions.
get_target_functional_dependencies
Returns target indices, for the determinant keys that are inside group by expressions.
update_elements_with_matching_indices 🔒
Updates entries inside the entries vector with their corresponding indices inside the proj_indices vector.