IndexSeek commented on code in PR #1990: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1990#discussion_r2255730694
########## src/parser/mod.rs: ########## @@ -11229,6 +11229,30 @@ impl<'a> Parser<'a> { } } + /// Parse an optionally signed integer literal. + fn parse_signed_integer(&mut self) -> Result<i64, ParserError> { + let next_token = self.next_token(); + let (sign, number_token) = match next_token.token { + Token::Minus => { + let number_token = self.next_token(); + (-1, number_token) + } + Token::Plus => { + let number_token = self.next_token(); + (1, number_token) + } + _ => (1, next_token), + }; Review Comment: Should we still parse the "+" character or error out? I know I originally added a test for it but I'm not sure any dialects support a "+" token in the scale definition for numeric types. -- 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