osipovartem commented on code in PR #1939:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1939#discussion_r2247700210


##########
src/parser/mod.rs:
##########
@@ -9756,6 +9771,15 @@ impl<'a> Parser<'a> {
         }
     }
 
+    /// Parse a boolean string
+    pub fn parse_boolean_string(&mut self) -> Result<bool, ParserError> {
+        match self.parse_one_of_keywords(&[Keyword::TRUE, Keyword::FALSE]) {
+            Some(Keyword::TRUE) => Ok(true),
+            Some(Keyword::FALSE) => Ok(false),
+            _ => self.expected("TRUE or FALSE", self.peek_token()),
+        }
+    }

Review Comment:
   Replaced duplicated code by parse_boolean_string call



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