pub enum DiffError {
NotImplemented(String),
InvalidMarker(String),
AmbiguousColumn(String),
ProjectionBoundary(String),
Parse(String),
Internal(String),
}Expand description
An error produced while differentiating or rewriting SQL.
Every failure mode of ddx-core is one of these. In keeping with design
principle 5 — fail loud, never silently wrong (design.md §2) — an
unsupported construct is always one of these typed errors, never an
approximate or silently-zero derivative.
Variants§
NotImplemented(String)
A node or function has no differentiation rule. This is the “permanent
or roadmap” bucket: atan2 (no rule yet), general u^v, CASE,
comparisons, string/temporal expressions (design.md §3.6).
InvalidMarker(String)
The wrt (or a marker call) is malformed: wrt is not a bare column,
wrong argument count, etc.
AmbiguousColumn(String)
An occurrence of the wrt base name could not be pinned syntactically —
a bare occurrence when wrt is qualified, or a qualified occurrence
when wrt is bare. Hard error demanding full qualification
(design.md §3.2, F2).
ProjectionBoundary(String)
A marker argument references an identifier that is a computed
select-list alias of a CTE/derived table in the same statement, used as
a non-wrt term — differentiation would silently drop terms across the
projection boundary (design.md §3.5, F3/G4).
Parse(String)
The input SQL did not parse under the given dialect. Only ever reported for a statement that contains a marker (the parse-free pre-gate means marker-free statements are never parsed, design.md §3.2, F5).
Internal(String)
An internal invariant was violated (e.g. an empty source span the API documents as possible, with no safe fallback). Should not occur in normal use.
Trait Implementations§
impl Eq for DiffError
Source§impl Error for DiffError
impl Error for DiffError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()