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 {
66546654 Replicate ,
66556655 ResolveAll ,
66566656 Role {
6657- role : Ident ,
6657+ role : ObjectName ,
66586658 } ,
66596659 Select {
66606660 columns : Option < Vec < Ident > > ,
Original file line number Diff line number Diff line change @@ -14357,7 +14357,7 @@ impl<'a> Parser<'a> {
1435714357 } else if self.parse_keyword(Keyword::REPLICATE) {
1435814358 Ok(Action::Replicate)
1435914359 } else if self.parse_keyword(Keyword::ROLE) {
14360- let role = self.parse_identifier( )?;
14360+ let role = self.parse_object_name(false )?;
1436114361 Ok(Action::Role { role })
1436214362 } else if self.parse_keyword(Keyword::SELECT) {
1436314363 Ok(Action::Select {
Original file line number Diff line number Diff line change @@ -9549,6 +9549,8 @@ fn parse_grant() {
95499549 verified_stmt("GRANT SELECT ON FUTURE SEQUENCES IN SCHEMA db1.sc1 TO ROLE role1");
95509550 verified_stmt("GRANT USAGE ON PROCEDURE db1.sc1.foo(INT) TO ROLE role1");
95519551 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");
95529554}
95539555
95549556#[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