pub enum EvalError {
UnknownColumn(FieldRef),
UnboundParameter(usize),
OperatorMismatch {
op: BinOp,
lhs: DataType,
rhs: DataType,
},
UnaryMismatch {
op: UnaryOp,
operand: DataType,
},
UnknownFunction {
name: String,
args: Vec<DataType>,
},
ImplicitCastFailed {
from: DataType,
to: DataType,
reason: String,
},
CastFailed {
from: DataType,
to: DataType,
reason: String,
},
ArithmeticOverflow {
op: BinOp,
},
DivisionByZero,
InvalidNumericResult {
function: String,
reason: String,
},
JsonParseFailed {
reason: String,
},
EmptyInList,
}Expand description
Errors surfaced by evaluate. Every variant is a runtime
failure shape — type-resolution failures live in
expr_typing::TypeError, not here.
Variants§
UnknownColumn(FieldRef)
Column / property not present in the row binding.
UnboundParameter(usize)
Query parameter placeholders are not resolved at this layer — the bind phase substitutes a concrete value before evaluation.
OperatorMismatch
Operator catalog has no overload that accepts these operand types, even after considering implicit coercions.
UnaryMismatch
Unary operator doesn’t accept the operand type.
UnknownFunction
Function catalog has no overload matching this call’s argument types. Includes user-defined functions because today’s catalog is the static built-in table only.
ImplicitCastFailed
Implicit cast required by the spine failed at runtime — the
catalog said the conversion was legal at Implicit context
but the value’s bytes couldn’t be converted (e.g. overflow on
BigInt → Integer).
CastFailed
Explicit CAST(x AS T) failed at runtime.
ArithmeticOverflow
Signed-integer overflow during arithmetic.
DivisionByZero
n / 0 or n % 0.
InvalidNumericResult
Numeric scalar evaluation produced an undefined or non-finite float result (domain error, overflow, NaN, or infinity).
JsonParseFailed
JSON_PARSE input was not valid JSON text.
EmptyInList
IN (...) against an empty value list — preserves the legacy
“always false” semantic but recorded explicitly so the
optimiser can fold it.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
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()