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 adedf9a927f Add support for SET SESSION openGauss (#28458)
adedf9a927f is described below
commit adedf9a927f5bed9e8e8e55fd564c04b8fac9a49
Author: Akash Pambhar <[email protected]>
AuthorDate: Tue Sep 19 07:33:12 2023 +0530
Add support for SET SESSION openGauss (#28458)
Add support for SET SESSION AUTHORIZATION FOR openGauss
---
.../dialect/opengauss/src/main/antlr4/imports/opengauss/DALStatement.g4 | 2 +-
test/it/parser/src/main/resources/case/dal/set.xml | 1 +
test/it/parser/src/main/resources/sql/supported/dal/set.xml | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git
a/parser/sql/dialect/opengauss/src/main/antlr4/imports/opengauss/DALStatement.g4
b/parser/sql/dialect/opengauss/src/main/antlr4/imports/opengauss/DALStatement.g4
index c7e2d9c0147..6344fecc527 100644
---
a/parser/sql/dialect/opengauss/src/main/antlr4/imports/opengauss/DALStatement.g4
+++
b/parser/sql/dialect/opengauss/src/main/antlr4/imports/opengauss/DALStatement.g4
@@ -33,7 +33,7 @@ set
| SCHEMA STRING_
| NAMES encoding?
| ROLE nonReservedWordOrSconst
- | SESSION AUTHORIZATION nonReservedWordOrSconst
+ | SESSION AUTHORIZATION IDENTIFIER_ PASSWORD STRING_
| SESSION AUTHORIZATION DEFAULT
| XML OPTION documentOrContent)
;
diff --git a/test/it/parser/src/main/resources/case/dal/set.xml
b/test/it/parser/src/main/resources/case/dal/set.xml
index 80b95dfbceb..f955d30e79a 100644
--- a/test/it/parser/src/main/resources/case/dal/set.xml
+++ b/test/it/parser/src/main/resources/case/dal/set.xml
@@ -118,4 +118,5 @@
<parameter name="CLIENT_ENCODING" />
</parameter-assign>
</set-parameter>
+ <set-parameter sql-case-id="set_session_authorization" />
</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/set.xml
b/test/it/parser/src/main/resources/sql/supported/dal/set.xml
index 7c748805f26..0f92b710d61 100644
--- a/test/it/parser/src/main/resources/sql/supported/dal/set.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dal/set.xml
@@ -44,4 +44,5 @@
<sql-case id="set_charset_mysql" value="SET NAMES 'utf8'" db-types="MySQL"
/>
<sql-case id="set_charset_postgresql" value="SET NAMES 'UTF8'"
db-types="PostgreSQL" />
<sql-case id="set_client_encoding" value="SET CLIENT_ENCODING TO 'UTF8'"
db-types="PostgreSQL" />
+ <sql-case id="set_session_authorization" value="SET SESSION AUTHORIZATION
user1 PASSWORD 'password'" db-types="openGauss" />
</sql-cases>