diff --git a/src/ast/mod.rs b/src/ast/mod.rs index 19966d21..3e02350e 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -996,7 +996,7 @@ pub enum Expr { data_type: DataType, /// The value of the constant. /// Hint: you can unwrap the string value using `value.into_string()`. - value: Value, + value: ValueWithSpan, }, /// Scalar function call e.g. `LEFT(foo, 5)` Function(Function), diff --git a/src/parser/mod.rs b/src/parser/mod.rs index a3856d70..11d44d1f 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -1521,7 +1521,7 @@ impl<'a> Parser<'a> { DataType::Custom(..) => parser_err!("dummy", loc), data_type => Ok(Expr::TypedString { data_type, - value: parser.parse_value()?.value, + value: parser.parse_value()?, }), } })?;