Expr::TypedString should retain Span location

This commit is contained in:
Joshua McQuistan 2025-07-02 14:25:33 +01:00
parent a3398223d7
commit e616a1c47c
2 changed files with 2 additions and 2 deletions

View file

@ -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),

View file

@ -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()?,
}),
}
})?;