mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 21:42:05 +00:00
Fix CASE
expression spans (#1874)
This commit is contained in:
parent
e2b1ae36e9
commit
ff29dd25b2
5 changed files with 43 additions and 9 deletions
|
@ -967,6 +967,8 @@ pub enum Expr {
|
|||
/// not `< 0` nor `1, 2, 3` as allowed in a `<simple when clause>` per
|
||||
/// <https://jakewheat.github.io/sql-overview/sql-2011-foundation-grammar.html#simple-when-clause>
|
||||
Case {
|
||||
case_token: AttachedToken,
|
||||
end_token: AttachedToken,
|
||||
operand: Option<Box<Expr>>,
|
||||
conditions: Vec<CaseWhen>,
|
||||
else_result: Option<Box<Expr>>,
|
||||
|
@ -1675,6 +1677,8 @@ impl fmt::Display for Expr {
|
|||
}
|
||||
Expr::Function(fun) => fun.fmt(f),
|
||||
Expr::Case {
|
||||
case_token: _,
|
||||
end_token: _,
|
||||
operand,
|
||||
conditions,
|
||||
else_result,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue