eliaperantoni opened a new pull request, #1874:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1874

   Previously, a `Expr::Case` implementation of `Spanned` would ignore the 
`CASE .. END` keywords. ie.
   
   ```sql
   CASE a WHEN b THEN c ELSE d END
   --   ^^^^^^^^^^^^^^^^^^^^^^
   --   Only this would be highlighted
   ```
   
   Because the only stored locations would be those of the `Ident` _inside_ the 
`CASE` expression.
   
   This PR attaches two `AttachedToken` to the AST node, one for `CASE` and one 
for `END`, so that `Spanned::span` now returns the whole range. This was done 
to follow the footsteps of the `SELECT` implementation, which also stores an 
`AttachedToken` for the `SELECT` keyword. Also added a test for this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to