File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6683,7 +6683,7 @@ pub enum Action {
66836683 Replicate ,
66846684 ResolveAll ,
66856685 Role {
6686- role : Ident ,
6686+ role : ObjectName ,
66876687 } ,
66886688 Select {
66896689 columns : Option < Vec < Ident > > ,
Original file line number Diff line number Diff line change @@ -14389,7 +14389,7 @@ impl<'a> Parser<'a> {
1438914389 } else if self.parse_keyword(Keyword::REPLICATE) {
1439014390 Ok(Action::Replicate)
1439114391 } else if self.parse_keyword(Keyword::ROLE) {
14392- let role = self.parse_identifier( )?;
14392+ let role = self.parse_object_name(false )?;
1439314393 Ok(Action::Role { role })
1439414394 } else if self.parse_keyword(Keyword::SELECT) {
1439514395 Ok(Action::Select {
Original file line number Diff line number Diff line change @@ -9550,6 +9550,8 @@ fn parse_grant() {
95509550 verified_stmt("GRANT SELECT ON FUTURE SEQUENCES IN SCHEMA db1.sc1 TO ROLE role1");
95519551 verified_stmt("GRANT USAGE ON PROCEDURE db1.sc1.foo(INT) TO ROLE role1");
95529552 verified_stmt("GRANT USAGE ON FUNCTION db1.sc1.foo(INT) TO ROLE role1");
9553+ verified_stmt("GRANT ROLE role1 TO ROLE role2");
9554+ verified_stmt("GRANT ROLE role1 TO USER user");
95539555}
95549556
95559557#[test]
Original file line number Diff line number Diff line change @@ -4519,4 +4519,7 @@ fn test_snowflake_identifier_function() {
45194519 . is_err( ) ,
45204520 true
45214521 ) ;
4522+
4523+ snowflake ( ) . verified_stmt ( "GRANT ROLE IDENTIFIER('AAA') TO USER IDENTIFIER('AAA')" ) ;
4524+ snowflake ( ) . verified_stmt ( "REVOKE ROLE IDENTIFIER('AAA') FROM USER IDENTIFIER('AAA')" ) ;
45224525}
You can’t perform that action at this time.
0 commit comments