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 @@ -6654,7 +6654,7 @@ pub enum Action {
6654
6654
Replicate ,
6655
6655
ResolveAll ,
6656
6656
Role {
6657
- role : Ident ,
6657
+ role : ObjectName ,
6658
6658
} ,
6659
6659
Select {
6660
6660
columns : Option < Vec < Ident > > ,
Original file line number Diff line number Diff line change @@ -14357,7 +14357,7 @@ impl<'a> Parser<'a> {
14357
14357
} else if self.parse_keyword(Keyword::REPLICATE) {
14358
14358
Ok(Action::Replicate)
14359
14359
} else if self.parse_keyword(Keyword::ROLE) {
14360
- let role = self.parse_identifier( )?;
14360
+ let role = self.parse_object_name(false )?;
14361
14361
Ok(Action::Role { role })
14362
14362
} else if self.parse_keyword(Keyword::SELECT) {
14363
14363
Ok(Action::Select {
Original file line number Diff line number Diff line change @@ -9549,6 +9549,8 @@ fn parse_grant() {
9549
9549
verified_stmt("GRANT SELECT ON FUTURE SEQUENCES IN SCHEMA db1.sc1 TO ROLE role1");
9550
9550
verified_stmt("GRANT USAGE ON PROCEDURE db1.sc1.foo(INT) TO ROLE role1");
9551
9551
verified_stmt("GRANT USAGE ON FUNCTION db1.sc1.foo(INT) TO ROLE role1");
9552
+ verified_stmt("GRANT ROLE role1 TO ROLE role2");
9553
+ verified_stmt("GRANT ROLE role1 TO USER user");
9552
9554
}
9553
9555
9554
9556
#[test]
Original file line number Diff line number Diff line change @@ -4500,4 +4500,7 @@ fn test_snowflake_identifier_function() {
4500
4500
. is_err( ) ,
4501
4501
true
4502
4502
) ;
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')" ) ;
4503
4506
}
You can’t perform that action at this time.
0 commit comments