This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 d095c58d967 Change SHOW DIST VARIABLE param grammar to to IDENTIFIER_
| STRING_ (#24304)
d095c58d967 is described below
commit d095c58d967ca75acdefa41c17e849aa1f0137f4
Author: ChenJiaHao <[email protected]>
AuthorDate: Thu Feb 23 13:17:43 2023 +0800
Change SHOW DIST VARIABLE param grammar to to IDENTIFIER_ | STRING_ (#24304)
* Change SHOW DIST VARIABLE param grammar to STRING_
* Change SHOW DIST VARIABLE param grammar to IDENTIFIER_ | STRING_
* Fix code style
---
distsql/parser/src/main/antlr4/imports/RALStatement.g4 | 2 +-
test/it/parser/src/main/resources/sql/supported/ral/queryable.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/distsql/parser/src/main/antlr4/imports/RALStatement.g4
b/distsql/parser/src/main/antlr4/imports/RALStatement.g4
index ab1b60f635b..e0053553b62 100644
--- a/distsql/parser/src/main/antlr4/imports/RALStatement.g4
+++ b/distsql/parser/src/main/antlr4/imports/RALStatement.g4
@@ -140,7 +140,7 @@ filePath
;
variableName
- : IDENTIFIER_
+ : IDENTIFIER_ | STRING_
;
variableValues
diff --git a/test/it/parser/src/main/resources/sql/supported/ral/queryable.xml
b/test/it/parser/src/main/resources/sql/supported/ral/queryable.xml
index f3f43170d2e..fac5acb0e4b 100644
--- a/test/it/parser/src/main/resources/sql/supported/ral/queryable.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ral/queryable.xml
@@ -17,7 +17,7 @@
-->
<sql-cases>
- <sql-case id="show-dist-variable" value="SHOW DIST VARIABLE WHERE NAME =
CACHED_CONNECTIONS" db-types="ShardingSphere" />
+ <sql-case id="show-dist-variable" value="SHOW DIST VARIABLE WHERE NAME =
'CACHED_CONNECTIONS'" db-types="ShardingSphere" />
<sql-case id="show-dist-variables" value="SHOW DIST VARIABLES"
db-types="ShardingSphere" />
<sql-case id="show-status-from-readwrite-splitting-rules" value="SHOW
STATUS FROM READWRITE_SPLITTING RULES" db-types="ShardingSphere" />