You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "osipovartem (via GitHub)" <gi...@apache.org> on 2025/08/01 11:05:21 UTC

Re: [PR] Snowflake create database [datafusion-sqlparser-rs]

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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org