isaacparker0 commented on code in PR #2168:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2168#discussion_r2750485742
##########
src/parser/mod.rs:
##########
@@ -9002,7 +9002,15 @@ impl<'a> Parser<'a> {
/// [ColumnOption::NotNull].
fn parse_column_option_expr(&mut self) -> Result<Expr, ParserError> {
if self.peek_token_ref().token == Token::LParen {
- let expr: Expr = self.with_state(ParserState::Normal, |p|
p.parse_prefix())?;
+ let mut expr = self.with_state(ParserState::Normal, |p|
p.parse_prefix())?;
Review Comment:
Thanks for pushing back on this. I thought about this some more, and I think
I came up with a more principled approach that also simplifies the solution
from https://github.com/apache/datafusion-sqlparser-rs/pull/1927: if we just
change `parse_prefix()` for LParen to switch to `ParserState::Normal`, it
allows us to remove the special-cased `parse_column_option_expr` added in
https://github.com/apache/datafusion-sqlparser-rs/pull/1927, while also fixing
the regression with `:: cast`.
Let me know what you think of this approach.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]