Enum proof_of_sql::sql::parse::ConversionError
source · pub enum ConversionError {
Show 17 variants
MissingColumn(Box<Identifier>, Box<ResourceId>),
MissingColumnWithoutTable(Box<Identifier>),
InvalidDataType {
expected: ColumnType,
actual: ColumnType,
},
DataTypeMismatch(String, String),
DifferentColumnLength(usize, usize),
DuplicateResultAlias(String),
NonbooleanWhereClause(ColumnType),
InvalidOrderBy(String),
InvalidGroupByColumnRef(String),
InvalidExpression(String),
DecimalRoundingError(String),
PrecisionParseError(String),
InvalidPrecision(u8),
ParseError(String),
LiteralRoundDownError(String),
Unprovable(String),
InvalidDecimal(String),
}
Expand description
Errors from converting an intermediate AST into a provable AST.
Variants§
MissingColumn(Box<Identifier>, Box<ResourceId>)
The column is missing in the table
MissingColumnWithoutTable(Box<Identifier>)
The column is missing (without table information)
InvalidDataType
Invalid data type received
DataTypeMismatch(String, String)
Data types do not match
DifferentColumnLength(usize, usize)
Two columns do not have the same length
DuplicateResultAlias(String)
Duplicate alias in result columns
NonbooleanWhereClause(ColumnType)
WHERE clause is not boolean
InvalidOrderBy(String)
ORDER BY clause references a non-existent alias
InvalidGroupByColumnRef(String)
GROUP BY clause references a non-existent column
InvalidExpression(String)
General error for invalid expressions
DecimalRoundingError(String)
Decimal rounding is not supported
PrecisionParseError(String)
Error in parsing precision in a query
InvalidPrecision(u8)
Decimal precision exceeds the allowed limit
ParseError(String)
General parsing error
LiteralRoundDownError(String)
Error when a rounding operation is not supported
Unprovable(String)
Query requires unprovable feature
InvalidDecimal(String)
Error when a decimal format or value is incorrect
Implementations§
source§impl ConversionError
impl ConversionError
sourcepub fn non_numeric_expr_in_agg<S: Into<String>>(dtype: S, func: S) -> Self
pub fn non_numeric_expr_in_agg<S: Into<String>>(dtype: S, func: S) -> Self
Returns a ConversionError::InvalidExpression
for non-numeric types used in numeric aggregation functions.
Trait Implementations§
source§impl Debug for ConversionError
impl Debug for ConversionError
source§impl Display for ConversionError
impl Display for ConversionError
source§impl Error for ConversionError
impl Error for ConversionError
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
source§impl From<ConversionError> for ArrowArrayToColumnConversionError
impl From<ConversionError> for ArrowArrayToColumnConversionError
source§fn from(source: ConversionError) -> Self
fn from(source: ConversionError) -> Self
source§impl From<ConversionError> for String
impl From<ConversionError> for String
source§fn from(error: ConversionError) -> Self
fn from(error: ConversionError) -> Self
source§impl From<DecimalError> for ConversionError
impl From<DecimalError> for ConversionError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
source§impl From<String> for ConversionError
impl From<String> for ConversionError
source§impl PartialEq for ConversionError
impl PartialEq for ConversionError
source§fn eq(&self, other: &ConversionError) -> bool
fn eq(&self, other: &ConversionError) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ConversionError
impl StructuralPartialEq for ConversionError
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnwindSafe for ConversionError
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more