This is an automated email from the ASF dual-hosted git repository.
chengzhang 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 3c0f33d0964 Fix show databases & show tables parse conflict with
oracle database type (#30465)
3c0f33d0964 is described below
commit 3c0f33d0964f7810e8ccbf7a66c013e79f4a10c5
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Tue Mar 12 15:01:24 2024 +0800
Fix show databases & show tables parse conflict with oracle database type
(#30465)
(cherry picked from commit 0d13ce89487346c5a4b7ae3c081f9c40f2848b5c)
---
.../dialect/oracle/src/main/antlr4/imports/oracle/DALStatement.g4 | 5 +++--
test/it/parser/src/main/resources/sql/unsupported/unsupported.xml | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git
a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DALStatement.g4
b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DALStatement.g4
index 615b61af370..4eb41eba31c 100644
--- a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DALStatement.g4
+++ b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DALStatement.g4
@@ -48,8 +48,9 @@ systemVariable
;
showOptions
- : systemVariable
- | ALL
+// TODO refactor systemVariable sytax according to
https://docs.oracle.com/en/database/oracle/oracle-database/23/sqpug/SET-system-variable-summary.html#GUID-A6A5ADFF-4119-4BA4-A13E-BC8D29166FAE
+// : systemVariable
+ : ALL
| CON_ID
| CON_NAME
| EDITION
diff --git a/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
b/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
index 0428a4c861a..68b0d8af659 100644
--- a/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
+++ b/test/it/parser/src/main/resources/sql/unsupported/unsupported.xml
@@ -321,4 +321,7 @@
<sql-case id="unsupported_select_case_for_opengauss_580" value="select
bool_or(@);" db-types="openGauss" />
<sql-case id="assertDistSQLShowRuleParseConflict" value="SHOW
READWRITE_SPLITTING RULE FROM schema_name" db-types="PostgreSQL,openGauss" />
<sql-case id="assertDistSQLRollbackMigration" value="ROLLBACK MIGRATION
10102p0000697d5ccb2e3d960d0gif75c7c7f486fal"
db-types="MySQL,PostgreSQL,openGauss,Oracle" />
+ <sql-case id="assertShowDatabasesParseConflict" value="SHOW DATABASES"
db-types="Oracle" />
+ <sql-case id="assertShowSchemasParseConflict" value="SHOW SCHEMAS"
db-types="Oracle" />
+ <sql-case id="assertShowTablesParseConflict" value="SHOW TABLES"
db-types="Oracle" />
</sql-cases>