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 39e3868  Fixes MySQL showXXX parser & test case code style problem. 
(#13910)
39e3868 is described below

commit 39e38689af64ea2924e903083d905a40d8dae9eb
Author: Zonglei Dong <[email protected]>
AuthorDate: Fri Dec 3 16:51:51 2021 +0800

    Fixes MySQL showXXX parser & test case code style problem. (#13910)
    
    * add ShowFilterSegment, refactor MySQL show open tables SQL parser.
    
    * add ShowFilterSegment test case, refactor MySQL show open tables SQL 
parser.
    
    * Fixes code comment.
    
    * Remove repeated xml code.
---
 .../asserts/statement/dal/impl/ShowCollationStatementAssert.java       | 2 +-
 .../asserts/statement/dal/impl/ShowEventsStatementAssert.java          | 2 +-
 .../asserts/statement/dal/impl/ShowOpenTablesStatementAssert.java      | 2 +-
 .../shardingsphere-parser-test/src/main/resources/case/dal/show.xml    | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowCollationStatementAssert.java
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowCollationStatementAssert.java
index 0e43112..84a26c7 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowCollationStatementAssert.java
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowCollationStatementAssert.java
@@ -31,7 +31,7 @@ import 
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
 public final class ShowCollationStatementAssert {
     
     /**
-     * Assert show collation statement is correct with expected show procedure 
code statement test case.
+     * Assert show collation statement is correct with expected parser result.
      *
      * @param assertContext assert context
      * @param actual actual show collation statement
diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowEventsStatementAssert.java
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowEventsStatementAssert.java
index 2623b3f..d03ac02 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowEventsStatementAssert.java
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowEventsStatementAssert.java
@@ -33,7 +33,7 @@ import 
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
 public final class ShowEventsStatementAssert {
     
     /**
-     * Assert show events statement is correct with expected show procedure 
code statement test case.
+     * Assert show events statement is correct with expected parser result.
      *
      * @param assertContext assert context
      * @param actual actual show events statement
diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowOpenTablesStatementAssert.java
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowOpenTablesStatementAssert.java
index ff786fa..74cb7b1 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowOpenTablesStatementAssert.java
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dal/impl/ShowOpenTablesStatementAssert.java
@@ -33,7 +33,7 @@ import 
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
 public final class ShowOpenTablesStatementAssert {
     
     /**
-     * Assert show open tables statement is correct with expected show 
procedure code statement test case.
+     * Assert show open tables statement is correct with expected parser 
result.
      *
      * @param assertContext assert context
      * @param actual actual show open tables statement
diff --git 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/show.xml
 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/show.xml
index c1aa832..e82ff08 100644
--- 
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/show.xml
+++ 
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/show.xml
@@ -562,9 +562,6 @@
     </show-events>
 
     <show-events sql-case-id="show_events_with_where_expr_no_parameter">
-        <from start-index="17" stop-index="34">
-            <schema name="sharding_db" start-delimiter="`" end-delimiter="`" 
start-index="22" stop-index="34"/>
-        </from>
         <from start-index="12" stop-index="29">
             <schema name="sharding_db" start-delimiter="`" end-delimiter="`" 
start-index="17" stop-index="29"/>
         </from>

Reply via email to