build(deps): bump snafu to 0.8 (#3911)

* change Cargo.toml

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* global replace

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* handle alias in script engine

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix clippy

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2024-05-10 21:36:25 +08:00
committed by GitHub
parent aec5cca2c7
commit 115c74791d
51 changed files with 2211 additions and 348 deletions

View File

@@ -65,6 +65,7 @@ pub enum Error {
Syntax {
#[snafu(source)]
error: ParserError,
#[snafu(implicit)]
location: Location,
},
@@ -73,6 +74,7 @@ pub enum Error {
TQLSyntax {
#[snafu(source)]
error: TQLError,
#[snafu(implicit)]
location: Location,
},
@@ -127,6 +129,7 @@ pub enum Error {
#[snafu(display("Invalid default constraint, column: {}", column))]
InvalidDefault {
column: String,
#[snafu(implicit)]
location: Location,
source: datatypes::error::Error,
},
@@ -135,28 +138,36 @@ pub enum Error {
InvalidCast {
sql_value: sqlparser::ast::Value,
datatype: ConcreteDataType,
#[snafu(implicit)]
location: Location,
source: datatypes::error::Error,
},
#[snafu(display("Unrecognized table option key: {}", key))]
InvalidTableOption { key: String, location: Location },
InvalidTableOption {
key: String,
#[snafu(implicit)]
location: Location,
},
#[snafu(display("Unrecognized table option key: {}, value: {}", key, value))]
InvalidTableOptionValue {
key: Ident,
value: Expr,
#[snafu(implicit)]
location: Location,
},
#[snafu(display("Failed to serialize column default constraint"))]
SerializeColumnDefaultConstraint {
#[snafu(implicit)]
location: Location,
source: datatypes::error::Error,
},
#[snafu(display("Failed to convert data type to gRPC data type defined in proto"))]
ConvertToGrpcDataType {
#[snafu(implicit)]
location: Location,
source: api::error::Error,
},
@@ -177,6 +188,7 @@ pub enum Error {
#[snafu(display("Unable to convert statement {} to DataFusion statement", statement))]
ConvertToDfStatement {
statement: String,
#[snafu(implicit)]
location: Location,
},
@@ -184,11 +196,16 @@ pub enum Error {
ConvertSqlValue {
value: SqlValue,
datatype: ConcreteDataType,
#[snafu(implicit)]
location: Location,
},
#[snafu(display("Unable to convert value {} to sql value", value))]
ConvertValue { value: Value, location: Location },
ConvertValue {
value: Value,
#[snafu(implicit)]
location: Location,
},
}
impl ErrorExt for Error {

View File

@@ -26,6 +26,7 @@ pub enum TQLError {
Parser {
#[snafu(source)]
error: ParserError,
#[snafu(implicit)]
location: Location,
},
@@ -33,6 +34,7 @@ pub enum TQLError {
ConvertToLogicalExpression {
#[snafu(source)]
error: DataFusionError,
#[snafu(implicit)]
location: Location,
},
@@ -40,6 +42,7 @@ pub enum TQLError {
Simplification {
#[snafu(source)]
error: DataFusionError,
#[snafu(implicit)]
location: Location,
},