File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed
Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6623,7 +6623,7 @@ pub enum Action {
66236623 Replicate ,
66246624 ResolveAll ,
66256625 Role {
6626- role : Ident ,
6626+ role : ObjectName ,
66276627 } ,
66286628 Select {
66296629 columns : Option < Vec < Ident > > ,
Original file line number Diff line number Diff line change @@ -14237,7 +14237,7 @@ impl<'a> Parser<'a> {
1423714237 } else if self.parse_keyword(Keyword::REPLICATE) {
1423814238 Ok(Action::Replicate)
1423914239 } else if self.parse_keyword(Keyword::ROLE) {
14240- let role = self.parse_identifier( )?;
14240+ let role = self.parse_object_name(false )?;
1424114241 Ok(Action::Role { role })
1424214242 } else if self.parse_keyword(Keyword::SELECT) {
1424314243 Ok(Action::Select {
Original file line number Diff line number Diff line change @@ -9484,6 +9484,8 @@ fn parse_grant() {
94849484 verified_stmt("GRANT SELECT ON FUTURE SEQUENCES IN SCHEMA db1.sc1 TO ROLE role1");
94859485 verified_stmt("GRANT USAGE ON PROCEDURE db1.sc1.foo(INT) TO ROLE role1");
94869486 verified_stmt("GRANT USAGE ON FUNCTION db1.sc1.foo(INT) TO ROLE role1");
9487+ verified_stmt("GRANT ROLE role1 TO ROLE role2");
9488+ verified_stmt("GRANT ROLE role1 TO USER user");
94879489}
94889490
94899491#[test]
Original file line number Diff line number Diff line change @@ -4500,4 +4500,7 @@ fn test_snowflake_identifier_function() {
45004500 . is_err( ) ,
45014501 true
45024502 ) ;
4503+
4504+ snowflake ( ) . verified_stmt ( "GRANT ROLE IDENTIFIER('AAA') TO USER IDENTIFIER('AAA')" ) ;
4505+ snowflake ( ) . verified_stmt ( "REVOKE ROLE IDENTIFIER('AAA') FROM USER IDENTIFIER('AAA')" ) ;
45034506}
You can’t perform that action at this time.
0 commit comments