iffyio commented on code in PR #2214:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2214#discussion_r2821316573


##########
src/parser/mod.rs:
##########
@@ -4543,7 +4543,13 @@ impl<'a> Parser<'a> {
     ///
     /// Returns true if the current token matches the expected keyword.
     pub fn peek_keyword(&self, expected: Keyword) -> bool {
-        matches!(&self.peek_token_ref().token, Token::Word(w) if expected == 
w.keyword)
+        self.peek_keyword_one_of(&[expected])
+    }
+
+    #[must_use]
+    /// Checks whether the current token is one of the expected keywords 
without consuming it.
+    fn peek_keyword_one_of(&self, expected: &[Keyword]) -> bool {
+        matches!(&self.peek_token_ref().token, Token::Word(w) if 
expected.contains(&w.keyword))

Review Comment:
   is this identical to the existing `peek_one_of_keywords` function?



##########
src/parser/mod.rs:
##########
@@ -16289,13 +16281,40 @@ impl<'a> Parser<'a> {
         Ok(ExprWithAlias { expr, alias })
     }
 
+    /// Parse an expression followed by an optional alias; Unlike

Review Comment:
   can we fix up the commits with the diffs from 
https://github.com/apache/datafusion-sqlparser-rs/pull/2209 contained in this 
PR?



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