You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/03/31 08:38:08 UTC

[GitHub] [incubator-shardingsphere] jingshanglu opened a new pull request #5020: add support for test of Join Table

jingshanglu opened a new pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020
 
 
   ref #4885 .
   
   Changes proposed in this pull request:
   - add support for test of Join Table
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607735206
 
 
   Some <tables> is not deleted because this cases are not executed, i'll check it later. @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-606997101
 
 
   Please check my comment, thx.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu removed a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu removed a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607712155
 
 
   I'll rename getTables(),delete <tables> next pr,this pr is a bit big,how about it? @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401383470
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/domain/segment/impl/ExpectedJoinSpecification.java
 ##########
 @@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.AbstractExpectedDelimiterSQLSegment;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Expected JoinSpecification.
+ */
+@Getter
+@Setter
+public final class ExpectedJoinSpecification extends AbstractExpectedDelimiterSQLSegment {
+    
+    @XmlAttribute
+    private String expr;
 
 Review comment:
   Why are they not `ExpectedPredicate` and `ExpectedColumn`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402147255
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java
 ##########
 @@ -39,4 +40,21 @@
     private final Collection<ColumnSegment> columns = new LinkedList<>();
     
     private Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getTables() {
 
 Review comment:
   I suggest you rename it as getSimpleTableSegment();

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607735206
 
 
   Some "\<tables\>" are not deleted because this cases are not executed, i'll check it later. @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607708403
 
 
   Hard work! But it also need more modifications. Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401541083
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java
 ##########
 @@ -39,4 +40,38 @@
     private final Collection<ColumnSegment> columns = new LinkedList<>();
     
     private Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getSimpleTableSegments() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != table && table instanceof SimpleTableSegment) {
+            tables.add((SimpleTableSegment) table);
+        }
+        if (null != tableReferences && !tableReferences.isEmpty()) {
+            for (TableReferenceSegment each: tableReferences) {
+                tables.addAll(each.getSimpleTableSegments());
+            }
+        }
+        return tables;
+    }
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getTables() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != table && table instanceof SimpleTableSegment) {
+            tables.add((SimpleTableSegment) table);
 
 Review comment:
   What is the difference?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401379539
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/table/TableFactorAssert.java
 ##########
 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.TableReferencesAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedTableFactor;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableFactorSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+
+import java.util.List;
+
+/**
+ * TableFactor assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableFactorAssert {
+    
+    /**
+     * Assert actual TableFactor segments is correct with expected TableFactor.
+     *
+     * @param assertContext assert context
+     * @param actual actual TableFactor
 
 Review comment:
   Sorry, my mistake

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r400787874
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/TableReferencesAssert.java
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.JoinTableAssert;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.TableFactorAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedJoinTable;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.JoinedTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * TableReferences assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableReferencesAssert {
+    
+    /**
+     * Assert actual TableReferences segments is correct with expected TableReferences.
+     *
+     * @param assertContext assert context
+     * @param actual        actual TableReferences
 
 Review comment:
   ok

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401544884
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java
 ##########
 @@ -39,12 +41,26 @@
      * get table.
      * @return tableSegment.
      */
-    public TableSegment getTable() {
-        if (null != tableFactor.getTable()) {
-            if (tableFactor.getTable() instanceof SimpleTableSegment) {
-                return tableFactor.getTable();
-            }
+    public Collection<SimpleTableSegment> getSimpleTableSegments() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != tableFactor) {
+            tables.addAll(tableFactor.getSimpleTableSegments());
+        }
+        if (null != joinSpecification) {
+            tables.addAll(joinSpecification.getSimpleTableSegments());
+        }
+        return tables;
+    }
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getTables() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != tableFactor) {
+            tables.addAll(tableFactor.getTables());
         }
-        return null;
+        return tables;
 
 Review comment:
   getTables has no duplicate table.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607712155
 
 
   I'll rename getTables(),delete <tables> next pr,this pr is a bit big,how about it? @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402137558
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dml/impl/SelectStatementAssert.java
 ##########
 @@ -52,11 +55,16 @@
      */
     public static void assertIs(final SQLCaseAssertContext assertContext, final SelectStatement actual, final SelectStatementTestCase expected) {
         assertProjection(assertContext, actual, expected);
-        assertTable(assertContext, actual, expected);
+//        assertTable(assertContext, actual, expected);
 
 Review comment:
   Why do not you remove this one?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero merged pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402146851
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-aggregate.xml
 ##########
 @@ -21,6 +21,11 @@
         <tables>
 
 Review comment:
   Please consider remove `<table>`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607064600
 
 
   Here some comments, please review them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10796](https://coveralls.io/builds/29792409)
   
   * **0** of **25**   **(0.0%)**  changed or added relevant lines in **4** files are covered.
   * **206** unchanged lines in **22** files lost coverage.
   * Overall coverage decreased (**-0.08%**) to **57.301%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 6 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 8 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   <!-- | **Total:** | **0** | **25** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29792409/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29792409/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/AbstractDataSourceAdapter.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fadapter%2FAbstractDataSourceAdapter.java#L114) | 1 | 97.3% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Forchestration%2Fapi%2Fyaml%2FYamlOrchestrationMasterSlaveDataSourceFactory.java#L118) | 1 | 62.5% |
   | [shardingsphere-database-protocol/shardingsphere-database-protocol-mysql/src/main/java/org/apache/shardingsphere/database/protocol/mysql/constant/MySQLBinlogEventType.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-database-protocol%2Fshardingsphere-database-protocol-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdatabase%2Fprotocol%2Fmysql%2Fconstant%2FMySQLBinlogEventType.java#L127) | 1 | 97.73% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29792409/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L49) | 1 | 0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29792409/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   <!-- | **Total:** | **206** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29792409/badge)](https://coveralls.io/builds/29792409) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.08% |
   | Covered Lines: | 11714 |
   | Relevant Lines: | 20443 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607735206
 
 
   Some "<tables>" are not deleted because this cases are not executed, i'll check it later. @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401384301
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/JoinSpecificationAssert.java
 ##########
 @@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedJoinSpecification;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.JoinSpecificationSegment;
+
+/**
+ * JoinSpecification assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class JoinSpecificationAssert {
+    
+    /**
+     * Assert actual JoinSpecification segments is correct with expected JoinSpecification.
+     *
+     * @param assertContext assert context
+     * @param actual actual JoinSpecification
+     * @param expected expected JoinSpecification
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, final JoinSpecificationSegment actual, final ExpectedJoinSpecification expected) {
+    }
 
 Review comment:
   It will be filled with content later, right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401326718
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/table/TableFactorAssert.java
 ##########
 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.TableReferencesAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedTableFactor;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableFactorSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+
+import java.util.List;
+
+/**
+ * TableFactor assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableFactorAssert {
+    
+    /**
+     * Assert actual TableFactor segments is correct with expected TableFactor.
+     *
+     * @param assertContext assert context
+     * @param actual actual TableFactor
 
 Review comment:
   It seems you forgot this one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401523601
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/JoinSpecificationAssert.java
 ##########
 @@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedJoinSpecification;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.JoinSpecificationSegment;
+
+/**
+ * JoinSpecification assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class JoinSpecificationAssert {
+    
+    /**
+     * Assert actual JoinSpecification segments is correct with expected JoinSpecification.
+     *
+     * @param assertContext assert context
+     * @param actual actual JoinSpecification
+     * @param expected expected JoinSpecification
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, final JoinSpecificationSegment actual, final ExpectedJoinSpecification expected) {
+    }
 
 Review comment:
   yes

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401540611
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java
 ##########
 @@ -39,12 +41,26 @@
      * get table.
      * @return tableSegment.
      */
-    public TableSegment getTable() {
-        if (null != tableFactor.getTable()) {
-            if (tableFactor.getTable() instanceof SimpleTableSegment) {
-                return tableFactor.getTable();
-            }
+    public Collection<SimpleTableSegment> getSimpleTableSegments() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != tableFactor) {
+            tables.addAll(tableFactor.getSimpleTableSegments());
+        }
+        if (null != joinSpecification) {
+            tables.addAll(joinSpecification.getSimpleTableSegments());
+        }
+        return tables;
+    }
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getTables() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != tableFactor) {
+            tables.addAll(tableFactor.getTables());
         }
-        return null;
+        return tables;
 
 Review comment:
   What's the difference?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402156440
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-aggregate.xml
 ##########
 @@ -21,6 +21,11 @@
         <tables>
 
 Review comment:
   Fix ExpectedJoinSpecification later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607807576
 
 
   A great gift to our community. :) @jingshanglu 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607712155
 
 
   I'll rename getTables(),delete <tables> next pr,this pr is a bit big,how about it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401536415
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/engine/SQLParserParameterizedTest.java
 ##########
 @@ -133,6 +133,9 @@ private static boolean isPlaceholderWithoutParameter(final Object[] sqlTestParam
     
     @Test
     public void assertSupportedSQL() {
+        if ("select_sharding_route_with_broadcast_table".equals(sqlCaseId) && "MySQL".equals(databaseType)) {
 
 Review comment:
   Please remove them

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r400776758
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/TableReferencesAssert.java
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.JoinTableAssert;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.TableFactorAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedJoinTable;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.JoinedTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * TableReferences assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableReferencesAssert {
+    
+    /**
+     * Assert actual TableReferences segments is correct with expected TableReferences.
+     *
+     * @param assertContext assert context
+     * @param actual        actual TableReferences
+     * @param expected      expected TableReferences
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, final List<TableReferenceSegment> actual, final List<ExpectedTableReference> expected) {
+        assertThat(assertContext.getText("TableReferences assert error"), actual.size(), is(expected.size()));
+        
 
 Review comment:
   Please remove useless empty line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401332117
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/table/TableFactorAssert.java
 ##########
 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.TableReferencesAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedTableFactor;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableFactorSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+
+import java.util.List;
+
+/**
+ * TableFactor assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableFactorAssert {
+    
+    /**
+     * Assert actual TableFactor segments is correct with expected TableFactor.
+     *
+     * @param assertContext assert context
+     * @param actual actual TableFactor
 
 Review comment:
   The same to other javadoc,the empty line?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401528217
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/domain/segment/impl/table/ExpectedTableFactor.java
 ##########
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.AbstractExpectedDelimiterSQLSegment;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.expr.simple.ExpectedSubquery;
+
+import javax.xml.bind.annotation.XmlElement;
+import java.util.Collection;
+
+/**
+ * Expected TableFactor.
+ */
+@Getter
+@Setter
+public final class ExpectedTableFactor extends AbstractExpectedDelimiterSQLSegment {
+    
+    @XmlElement
+    private ExpectedSimpleTable table;
+    
+    @XmlElement
+    private ExpectedSubquery subquery;
+    
 
 Review comment:
   Add it later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10788](https://coveralls.io/builds/29788926)
   
   * **0** of **25**   **(0.0%)**  changed or added relevant lines in **4** files are covered.
   * **206** unchanged lines in **22** files lost coverage.
   * Overall coverage decreased (**-0.08%**) to **57.301%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 6 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 8 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   <!-- | **Total:** | **0** | **25** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29788926/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29788926/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/AbstractDataSourceAdapter.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fadapter%2FAbstractDataSourceAdapter.java#L114) | 1 | 97.3% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Forchestration%2Fapi%2Fyaml%2FYamlOrchestrationMasterSlaveDataSourceFactory.java#L118) | 1 | 62.5% |
   | [shardingsphere-database-protocol/shardingsphere-database-protocol-mysql/src/main/java/org/apache/shardingsphere/database/protocol/mysql/constant/MySQLBinlogEventType.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-database-protocol%2Fshardingsphere-database-protocol-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdatabase%2Fprotocol%2Fmysql%2Fconstant%2FMySQLBinlogEventType.java#L127) | 1 | 97.73% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29788926/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L49) | 1 | 0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29788926/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   <!-- | **Total:** | **206** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29788926/badge)](https://coveralls.io/builds/29788926) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.08% |
   | Covered Lines: | 11714 |
   | Relevant Lines: | 20443 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401545251
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java
 ##########
 @@ -39,4 +40,38 @@
     private final Collection<ColumnSegment> columns = new LinkedList<>();
     
     private Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getSimpleTableSegments() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != table && table instanceof SimpleTableSegment) {
+            tables.add((SimpleTableSegment) table);
+        }
+        if (null != tableReferences && !tableReferences.isEmpty()) {
+            for (TableReferenceSegment each: tableReferences) {
+                tables.addAll(each.getSimpleTableSegments());
+            }
+        }
+        return tables;
+    }
+    
+    /**
+     * get tables.
+     * @return tables.
+     */
+    public Collection<SimpleTableSegment> getTables() {
+        Collection<SimpleTableSegment> tables = new LinkedList<>();
+        if (null != table && table instanceof SimpleTableSegment) {
+            tables.add((SimpleTableSegment) table);
 
 Review comment:
   getTables has no duplicate table.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10784](https://coveralls.io/builds/29788398)
   
   * **0** of **25**   **(0.0%)**  changed or added relevant lines in **4** files are covered.
   * **231** unchanged lines in **25** files lost coverage.
   * Overall coverage decreased (**-0.1%**) to **57.231%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 6 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 8 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   <!-- | **Total:** | **0** | **25** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29788398/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29788398/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/AbstractDataSourceAdapter.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fadapter%2FAbstractDataSourceAdapter.java#L114) | 1 | 97.3% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Forchestration%2Fapi%2Fyaml%2FYamlOrchestrationMasterSlaveDataSourceFactory.java#L118) | 1 | 62.5% |
   | [shardingsphere-database-protocol/shardingsphere-database-protocol-mysql/src/main/java/org/apache/shardingsphere/database/protocol/mysql/constant/MySQLBinlogEventType.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-database-protocol%2Fshardingsphere-database-protocol-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdatabase%2Fprotocol%2Fmysql%2Fconstant%2FMySQLBinlogEventType.java#L127) | 1 | 97.73% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29788398/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   | [shardingsphere-underlying/shardingsphere-common/src/main/java/org/apache/shardingsphere/underlying/common/database/type/DatabaseTypes.java](https://coveralls.io/builds/29788398/source?filename=shardingsphere-underlying%2Fshardingsphere-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Fcommon%2Fdatabase%2Ftype%2FDatabaseTypes.java#L30) | 2 | 83.33% |
   <!-- | **Total:** | **231** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29788398/badge)](https://coveralls.io/builds/29788398) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.1% |
   | Covered Lines: | 11714 |
   | Relevant Lines: | 20468 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r401386129
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/domain/segment/impl/table/ExpectedTableFactor.java
 ##########
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.AbstractExpectedDelimiterSQLSegment;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.expr.simple.ExpectedSubquery;
+
+import javax.xml.bind.annotation.XmlElement;
+import java.util.Collection;
+
+/**
+ * Expected TableFactor.
+ */
+@Getter
+@Setter
+public final class ExpectedTableFactor extends AbstractExpectedDelimiterSQLSegment {
+    
+    @XmlElement
+    private ExpectedSimpleTable table;
+    
+    @XmlElement
+    private ExpectedSubquery subquery;
+    
 
 Review comment:
   Do you think a collection of `expectedColumn` is needed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10770](https://coveralls.io/builds/29766188)
   
   * **0** of **49**   **(0.0%)**  changed or added relevant lines in **5** files are covered.
   * **80** unchanged lines in **14** files lost coverage.
   * Overall coverage decreased (**-0.3%**) to **57.06%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L109) | 0 | 5 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 9 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 10 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 16 | 0.0%
   <!-- | **Total:** | **0** | **49** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29766188/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29766188/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29766188/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29766188/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29766188/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L52) | 1 | 0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29766188/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   | [shardingsphere-underlying/shardingsphere-common/src/main/java/org/apache/shardingsphere/underlying/common/database/type/DatabaseTypes.java](https://coveralls.io/builds/29766188/source?filename=shardingsphere-underlying%2Fshardingsphere-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Fcommon%2Fdatabase%2Ftype%2FDatabaseTypes.java#L30) | 2 | 83.33% |
   | [encrypt-core/encrypt-core-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java](https://coveralls.io/builds/29766188/source?filename=encrypt-core%2Fencrypt-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fencrypt%2Frule%2FEncryptRule.java#L60) | 5 | 92.06% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/MasterSlaveRule.java](https://coveralls.io/builds/29766188/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FMasterSlaveRule.java#L53) | 6 | 55.0% |
   <!-- | **Total:** | **80** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29766188/badge)](https://coveralls.io/builds/29766188) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.3% |
   | Covered Lines: | 11667 |
   | Relevant Lines: | 20447 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10794](https://coveralls.io/builds/29791932)
   
   * **0** of **25**   **(0.0%)**  changed or added relevant lines in **4** files are covered.
   * **206** unchanged lines in **22** files lost coverage.
   * Overall coverage decreased (**-0.08%**) to **57.301%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 6 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 8 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   <!-- | **Total:** | **0** | **25** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29791932/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29791932/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/AbstractDataSourceAdapter.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fadapter%2FAbstractDataSourceAdapter.java#L114) | 1 | 97.3% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Forchestration%2Fapi%2Fyaml%2FYamlOrchestrationMasterSlaveDataSourceFactory.java#L118) | 1 | 62.5% |
   | [shardingsphere-database-protocol/shardingsphere-database-protocol-mysql/src/main/java/org/apache/shardingsphere/database/protocol/mysql/constant/MySQLBinlogEventType.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-database-protocol%2Fshardingsphere-database-protocol-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdatabase%2Fprotocol%2Fmysql%2Fconstant%2FMySQLBinlogEventType.java#L127) | 1 | 97.73% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29791932/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L49) | 1 | 0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29791932/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   <!-- | **Total:** | **206** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29791932/badge)](https://coveralls.io/builds/29791932) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.08% |
   | Covered Lines: | 11714 |
   | Relevant Lines: | 20443 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu commented on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607664382
 
 
   I have replaced table assert with tableReference assert, without reducing test coverage, and also removing getTables func. @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607189854
 
 
   ## Pull Request Test Coverage Report for [Build 10777](https://coveralls.io/builds/29767570)
   
   * **0** of **49**   **(0.0%)**  changed or added relevant lines in **5** files are covered.
   * **134** unchanged lines in **18** files lost coverage.
   * Overall coverage decreased (**-0.2%**) to **57.147%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L109) | 0 | 5 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinSpecificationSegment.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L48) | 0 | 9 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L47) | 0 | 9 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L45) | 0 | 10 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L49) | 0 | 16 | 0.0%
   <!-- | **Total:** | **0** | **49** | **0.0%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RandomMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29767570/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRandomMasterSlaveLoadBalanceAlgorithm.java#L39) | 1 | 75.0% |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/masterslave/RoundRobinMasterSlaveLoadBalanceAlgorithm.java](https://coveralls.io/builds/29767570/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Fmasterslave%2FRoundRobinMasterSlaveLoadBalanceAlgorithm.java#L42) | 1 | 87.5% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29767570/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L153) | 1 | 97.62% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/context/ShardingRuntimeContext.java](https://coveralls.io/builds/29767570/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fcontext%2FShardingRuntimeContext.java#L71) | 1 | 94.74% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/AdaptedDatabaseMetaData.java](https://coveralls.io/builds/29767570/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FAdaptedDatabaseMetaData.java#L196) | 1 | 99.32% |
   | [sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java](https://coveralls.io/builds/29767570/source?filename=sharding-jdbc%2Fsharding-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Forchestration%2Fapi%2Fyaml%2FYamlOrchestrationMasterSlaveDataSourceFactory.java#L118) | 1 | 62.5% |
   | [shardingsphere-database-protocol/shardingsphere-database-protocol-mysql/src/main/java/org/apache/shardingsphere/database/protocol/mysql/constant/MySQLBinlogEventType.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-database-protocol%2Fshardingsphere-database-protocol-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdatabase%2Fprotocol%2Fmysql%2Fconstant%2FMySQLBinlogEventType.java#L127) | 1 | 97.73% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L52) | 1 | 0% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/datasource/metadata/CachedDatabaseMetaData.java](https://coveralls.io/builds/29767570/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fjdbc%2Fcore%2Fdatasource%2Fmetadata%2FCachedDatabaseMetaData.java#L439) | 2 | 97.16% |
   | [shardingsphere-underlying/shardingsphere-common/src/main/java/org/apache/shardingsphere/underlying/common/database/type/DatabaseTypes.java](https://coveralls.io/builds/29767570/source?filename=shardingsphere-underlying%2Fshardingsphere-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Funderlying%2Fcommon%2Fdatabase%2Ftype%2FDatabaseTypes.java#L30) | 2 | 83.33% |
   <!-- | **Total:** | **134** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29767570/badge)](https://coveralls.io/builds/29767570) |
   | :-- | --: |
   | Change from base [Build 10727](https://coveralls.io/builds/29734522): |  -0.2% |
   | Covered Lines: | 11690 |
   | Relevant Lines: | 20456 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r400776512
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/segment/TableReferencesAssert.java
 ##########
 @@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.asserts.segment;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.JoinTableAssert;
+import org.apache.shardingsphere.sql.parser.integrate.asserts.segment.table.TableFactorAssert;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.ExpectedTableReference;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl.table.ExpectedJoinTable;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.JoinedTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.TableReferenceSegment;
+
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * TableReferences assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class TableReferencesAssert {
+    
+    /**
+     * Assert actual TableReferences segments is correct with expected TableReferences.
+     *
+     * @param assertContext assert context
+     * @param actual        actual TableReferences
 
 Review comment:
   Please check with other javadoc and make the format consist

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402136481
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/JoinedTableSegment.java
 ##########
 @@ -39,12 +41,14 @@
      * get table.
      * @return tableSegment.
      */
-    public TableSegment getTable() {
-        if (null != tableFactor.getTable()) {
-            if (tableFactor.getTable() instanceof SimpleTableSegment) {
-                return tableFactor.getTable();
-            }
+    public Collection<SimpleTableSegment> getTables() {
 
 Review comment:
   I suggest you rename it as `getSimpleTableSegment()`;

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] jingshanglu edited a comment on issue #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
jingshanglu edited a comment on issue #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#issuecomment-607735206
 
 
   Some tables is not deleted because this cases are not executed, i'll check it later. @tristaZero 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #5020: add support for test of Join Table

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5020: add support for test of Join Table
URL: https://github.com/apache/incubator-shardingsphere/pull/5020#discussion_r402144578
 
 

 ##########
 File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/jaxb/domain/segment/impl/ExpectedJoinSpecification.java
 ##########
 @@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.impl;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.integrate.jaxb.domain.segment.AbstractExpectedDelimiterSQLSegment;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Expected JoinSpecification.
+ */
+@Getter
+@Setter
+public final class ExpectedJoinSpecification extends AbstractExpectedDelimiterSQLSegment {
+    
+    @XmlAttribute
+    private String expr;
 
 Review comment:
   Fix them later?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services