isaacparker0 commented on code in PR #2168:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2168#discussion_r2747226001


##########
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:
   This approach would only handle the `::` case. There could be other infix 
operators or chained casts, which my current approach handles properly by 
leveraging the full existing infix loop.
   
   I added additional test cases to document this behavior.



-- 
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]

Reply via email to