isaacparker0 commented on code in PR #2168:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2168#discussion_r2747839057
##########
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:
What about a non `::` operator, such as `CREATE TABLE t (c INT DEFAULT
(foo()) + 1)`? (I just added a test case for this)
Admittedly, we are getting into the territory of obscure but technically
legal postgres syntax, but it still seems like we should solve this in a more
general way than hardcoding one specific operator.
--
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]