IndexSeek commented on code in PR #1990:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1990#discussion_r2264190270


##########
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:
   That sounds good to me! I also added back that test that was explicitly 
checking to ensure that would work and be removed, but we can remove those 
lines if it is redundant. 



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