You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2023/07/23 13:52:40 UTC
[shardingsphere] branch master updated: Refactor drop role statement. (#27262)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 1475527cb7f Refactor drop role statement. (#27262)
1475527cb7f is described below
commit 1475527cb7f8af899869f62c2dff20cbb64f7a55
Author: boyjoy1127 <10...@users.noreply.github.com>
AuthorDate: Sun Jul 23 21:52:33 2023 +0800
Refactor drop role statement. (#27262)
* refactor: support drop role statement.
* test: add more test on drop role SQL.
* test: add more test on drop role SQL.
---
.../sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4 | 2 +-
test/it/parser/src/main/resources/case/dcl/drop-role.xml | 1 +
test/it/parser/src/main/resources/sql/supported/dcl/drop-role.xml | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4 b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4
index f67c378e8f1..4651eaa5e64 100644
--- a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4
+++ b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4
@@ -315,7 +315,7 @@ createRole
;
dropRole
- : DROP ROLE
+ : DROP ROLE roleName
;
alterRole
diff --git a/test/it/parser/src/main/resources/case/dcl/drop-role.xml b/test/it/parser/src/main/resources/case/dcl/drop-role.xml
index 9f9e633ea52..dfea35d9311 100644
--- a/test/it/parser/src/main/resources/case/dcl/drop-role.xml
+++ b/test/it/parser/src/main/resources/case/dcl/drop-role.xml
@@ -20,4 +20,5 @@
<drop-role sql-case-id="drop_role" />
<drop-role sql-case-id="drop_roles" />
<drop-role sql-case-id="drop_role_if_exists" />
+ <drop-role sql-case-id="drop_role_appsuser" />
</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dcl/drop-role.xml b/test/it/parser/src/main/resources/sql/supported/dcl/drop-role.xml
index 23e0298323f..af70937bbf5 100644
--- a/test/it/parser/src/main/resources/sql/supported/dcl/drop-role.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dcl/drop-role.xml
@@ -20,4 +20,5 @@
<sql-case id="drop_role" value="DROP ROLE role1" db-types="MySQL,Oracle,PostgreSQL,openGauss,SQLServer" />
<sql-case id="drop_roles" value="DROP ROLE role1, role2" db-types="MySQL,PostgreSQL,openGauss" />
<sql-case id="drop_role_if_exists" value="DROP ROLE IF EXISTS role1" db-types="MySQL,PostgreSQL,openGauss,SQLServer" />
+ <sql-case id="drop_role_appsuser" value="DROP ROLE apps_user" db-types="Oracle" />
</sql-cases>