Module datafusion_physical_expr::intervals::cp_solver
source · Expand description
Constraint propagator/solver for custom PhysicalExpr graphs.
Structs
- This object implements a directed acyclic expression graph (DAEG) that is used to compute ranges for expressions through interval arithmetic.
- This is a node in the DAEG; it encapsulates a reference to the actual PhysicalExpr as well as an interval containing expression bounds.
Enums
- This object encapsulates all possible constraint propagation results.
Functions
- This function refines intervals
left_child
andright_child
by applying constraint propagation throughparent
via operation. The main idea is that we can shrink ranges of variables x and y using parent interval p. - This function propagates constraints arising from comparison operators. The main idea is that we can analyze an inequality like x > y through the equivalent inequality x - y > 0. Assuming that x and y has ranges [xL, xU] and [yL, yU], we simply apply constraint propagation across [xL, xU], [yL, yH] and [0, ∞]. Specifically, we would first do - [xL, xU] <- ([yL, yU] + [0, ∞]) ∩ [xL, xU], and then - [yL, yU] <- ([xL, xU] - [0, ∞]) ∩ [yL, yU].
- Converts the
time interval
(as the left child) to duration, then performs the propagation rule for comparison operators. - Converts the
time interval
(as the right child) to duration, then performs the propagation rule for comparison operators.