LucaCappelletti94 commented on code in PR #2429:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2429#discussion_r4322933195
##########
src/parser/mod.rs:
##########
@@ -7028,9 +7032,13 @@ impl<'a> Parser<'a> {
}
}
- /// Parse a `CREATE ROLE` statement.
- pub fn parse_create_role(&mut self) -> Result<CreateRole, ParserError> {
- let if_not_exists = self.parse_keywords(&[Keyword::IF, Keyword::NOT,
Keyword::EXISTS]);
+ /// Parse a `CREATE ROLE` or `CREATE GROUP` statement, after the keyword
has been consumed.
+ pub fn parse_create_role(
+ &mut self,
+ role_keyword: RoleKeyword,
+ ) -> Result<CreateRole, ParserError> {
+ let if_not_exists = matches!(role_keyword, RoleKeyword::Role)
Review Comment:
Now it rejects consistently in both cases
--
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]