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/24 09:49:12 UTC
[GitHub] [incubator-shardingsphere] jingshanglu opened a new pull request
#4916: add tableReferences in selectStatement
jingshanglu opened a new pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916
ref #4885 .
Changes proposed in this pull request:
- add tableReferences in selectStatement
- Keep tables and remove tables in the next subtask
- only change for mysql ,Subtasks behind will be compatible with other db
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397740349
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-join.xml
##########
@@ -48,8 +48,8 @@
<simple-table name="t_order" start-index="27" stop-index="33" />
<simple-table name="t_order_item" start-index="40" stop-index="51" />
<!-- FIXME should not has table segment for owner -->
- <simple-table name="t_order" start-index="56" stop-index="62" />
- <simple-table name="t_order_item" start-index="75" stop-index="86" />
Review comment:
If you plan to delete them in the future, please add TODO comment for reminding.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397625373
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +495,67 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
+ if (null != tableFactor) {
+ result.setTable((TableSegment) tableFactor);
}
}
- if (null != ctx.joinedTable()) {
- for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ if (!ctx.joinedTable().isEmpty()) {
+ for (JoinedTableContext jc : ctx.joinedTable()) {
+ JoinedTableSegment joinedTableSegment = (JoinedTableSegment) visit(jc);
+ result.getJoinedTables().add(joinedTableSegment);
}
}
return result;
}
@Override
public ASTNode visitTableFactor(final TableFactorContext ctx) {
+ if (null != ctx.subquery()) {
+ visit(ctx.subquery());
+ }
if (null != ctx.tableName()) {
SimpleTableSegment result = (SimpleTableSegment) visit(ctx.tableName());
if (null != ctx.alias()) {
result.setAlias((AliasSegment) visit(ctx.alias()));
}
return result;
}
- if (null != ctx.tableReferences()) {
- return visit(ctx.tableReferences());
- }
- SubqueryTableSegment result = new SubqueryTableSegment(new SubquerySegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (SelectStatement) visit(ctx.subquery())));
Review comment:
I'll add 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r398298231
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-join.xml
##########
@@ -48,8 +48,8 @@
<simple-table name="t_order" start-index="27" stop-index="33" />
<simple-table name="t_order_item" start-index="40" stop-index="51" />
<!-- FIXME should not has table segment for owner -->
- <simple-table name="t_order" start-index="56" stop-index="62" />
- <simple-table name="t_order_item" start-index="75" stop-index="86" />
Review comment:
? I guess you missed this comment
----------------------------------------------------------------
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
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603160941
## Pull Request Test Coverage Report for [Build 10546](https://coveralls.io/builds/29599123)
* **0** of **62** **(0.0%)** changed or added relevant lines in **6** files are covered.
* **124** unchanged lines in **9** files lost coverage.
* Overall coverage decreased (**-0.1%**) to **57.99%**
---
| 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/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L48) | 0 | 1 | 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/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L31) | 0 | 2 | 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/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L32) | 0 | 3 | 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/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L27) | 0 | 4 | 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/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L30) | 0 | 12 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L208) | 0 | 40 | 0.0%
<!-- | **Total:** | **0** | **62** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29599123/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L70) | 1 | 94.44% |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29599123/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L116) | 2 | 93.48% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java](https://coveralls.io/builds/29599123/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FTableRule.java#L164) | 3 | 90.53% |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29599123/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29599123/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L116) | 7 | 76.47% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29599123/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L374) | 8 | 85.21% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java](https://coveralls.io/builds/29599123/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FMemoryChannel.java#L61) | 8 | 51.85% |
| [sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/ShardingRouteDecorator.java](https://coveralls.io/builds/29599123/source?filename=sharding-core%2Fsharding-core-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2FShardingRouteDecorator.java#L65) | 17 | 32.14% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29599123/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L215) | 75 | 0% |
<!-- | **Total:** | **124** | | -->
| Totals | [](https://coveralls.io/builds/29599123) |
| :-- | --: |
| Change from base [Build 1155](https://coveralls.io/builds/29574204): | -0.1% |
| Covered Lines: | 11878 |
| Relevant Lines: | 20483 |
---
##### 💛 - [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 commented on issue #4916: add
tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603160941
## Pull Request Test Coverage Report for [Build 10526](https://coveralls.io/builds/29575464)
* **0** of **55** **(0.0%)** changed or added relevant lines in **5** files are covered.
* **34** unchanged lines in **7** files lost coverage.
* Overall coverage decreased (**-0.1%**) to **57.993%**
---
| 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/JoinedTableSegment.java](https://coveralls.io/builds/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L27) | 0 | 1 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L48) | 0 | 1 | 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/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L31) | 0 | 2 | 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/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L31) | 0 | 11 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L207) | 0 | 40 | 0.0%
<!-- | **Total:** | **0** | **55** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29575464/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L71) | 1 | 94.44% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java](https://coveralls.io/builds/29575464/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FTableRule.java#L164) | 3 | 90.53% |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29575464/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29575464/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L294) | 4 | 0% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29575464/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L116) | 7 | 76.47% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29575464/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L374) | 8 | 85.21% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java](https://coveralls.io/builds/29575464/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FMemoryChannel.java#L61) | 8 | 51.85% |
<!-- | **Total:** | **34** | | -->
| Totals | [](https://coveralls.io/builds/29575464) |
| :-- | --: |
| Change from base [Build 1155](https://coveralls.io/builds/29574204): | -0.1% |
| Covered Lines: | 11873 |
| Relevant Lines: | 20473 |
---
##### 💛 - [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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597581
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -279,7 +286,11 @@ public ASTNode visitSingleTableClause(final SingleTableClauseContext ctx) {
public ASTNode visitMultipleTablesClause(final MultipleTablesClauseContext ctx) {
CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
result.combine((CollectionValue<SimpleTableSegment>) visit(ctx.multipleTableNames()));
- result.combine((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences()));
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.tableReferences());
+ for (TableReferenceSegment t : tableReferences.getValue()) {
Review comment:
Please use the value named `each` for `for loop`.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r398298401
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java
##########
@@ -44,6 +45,8 @@
private ProjectionsSegment projections;
+ private final Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
Review comment:
But I can not find any relevant changes on this page.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597322
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -279,7 +286,11 @@ public ASTNode visitSingleTableClause(final SingleTableClauseContext ctx) {
public ASTNode visitMultipleTablesClause(final MultipleTablesClauseContext ctx) {
CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
result.combine((CollectionValue<SimpleTableSegment>) visit(ctx.multipleTableNames()));
- result.combine((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences()));
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.tableReferences());
+ for (TableReferenceSegment t : tableReferences.getValue()) {
+ result.getValue().addAll(t.getTables());
+ }
+// result.combine((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences()));
Review comment:
Why did not you comment on this sentence instead of deleting 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397595889
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java
##########
@@ -44,6 +45,8 @@
private ProjectionsSegment projections;
+ private final Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
Review comment:
Do you think `private final Collection<TableSegment> tables = new LinkedList<>();` can be deleted from this class?
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597306
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -315,7 +326,12 @@ public ASTNode visitSelectClause(final SelectClauseContext ctx) {
result.getProjections().setDistinctRow(isDistinct(ctx));
}
if (null != ctx.fromClause()) {
- result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.fromClause())).getValue());
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.fromClause());
+ for (TableReferenceSegment t : tableReferences.getValue()) {
Review comment:
Please use the value named `each` for `for loop`.
----------------------------------------------------------------
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] codecov-io edited a comment on issue
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603157625
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=h1) Report
> Merging [#4916](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/806c231f30585a382d5dfdc5a0637c3df0bd1a68&el=desc) will **decrease** coverage by `0.18%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4916 +/- ##
============================================
- Coverage 54.65% 54.47% -0.19%
- Complexity 436 440 +4
============================================
Files 1138 1140 +2
Lines 20403 20483 +80
Branches 3750 3764 +14
============================================
+ Hits 11152 11158 +6
- Misses 8547 8617 +70
- Partials 704 708 +4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL2ltcGwvTXlTUUxETUxWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...rser/sql/segment/dml/JoinSpecificationSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pblNwZWNpZmljYXRpb25TZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...sql/parser/sql/segment/dml/JoinedTableSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pbmVkVGFibGVTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...sql/parser/sql/segment/dml/TableFactorSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVGYWN0b3JTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../parser/sql/segment/dml/TableReferenceSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVSZWZlcmVuY2VTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../sql/parser/sql/statement/dml/SelectStatement.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc3RhdGVtZW50L2RtbC9TZWxlY3RTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...or/impl/keygen/BaseGeneratedKeyTokenGenerator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3Jld3JpdGUvdG9rZW4vZ2VuZXJhdG9yL2ltcGwva2V5Z2VuL0Jhc2VHZW5lcmF0ZWRLZXlUb2tlbkdlbmVyYXRvci5qYXZh) | `66.66% <0.00%> (-16.67%)` | `1.00% <0.00%> (ø%)` | |
| [...phere/sharding/merge/dql/orderby/OrderByValue.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvb3JkZXJieS9PcmRlckJ5VmFsdWUuamF2YQ==) | `83.67% <0.00%> (-9.88%)` | `0.00% <0.00%> (ø%)` | |
| [.../sharding/route/engine/ShardingRouteDecorator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJvdXRlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9yb3V0ZS9lbmdpbmUvU2hhcmRpbmdSb3V0ZURlY29yYXRvci5qYXZh) | `23.21% <0.00%> (-3.91%)` | `0.00% <0.00%> (ø%)` | |
| [...r/binder/statement/dml/InsertStatementContext.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWJpbmRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9iaW5kZXIvc3RhdGVtZW50L2RtbC9JbnNlcnRTdGF0ZW1lbnRDb250ZXh0LmphdmE=) | `86.36% <0.00%> (-3.64%)` | `0.00% <0.00%> (ø%)` | |
| ... and [53 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=footer). Last update [806c231...36ef256](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397790899
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java
##########
@@ -0,0 +1,47 @@
+/*
+ * 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.sql.segment.dml;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.sql.segment.SQLSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.TableSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+@Getter
+@Setter
+public final class TableFactorSegment implements SQLSegment {
+
+ private int startIndex;
+
+ private int stopIndex;
+
+ private TableSegment table;
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] tristaZero commented on issue #4916: add
tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603628937
The approach you took is basically correct and a good start for this issue. However some comments and doubts need your feedback.
@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 a change in
pull request #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397628231
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-join.xml
##########
@@ -48,8 +48,8 @@
<simple-table name="t_order" start-index="27" stop-index="33" />
<simple-table name="t_order_item" start-index="40" stop-index="51" />
<!-- FIXME should not has table segment for owner -->
- <simple-table name="t_order" start-index="56" stop-index="62" />
- <simple-table name="t_order_item" start-index="75" stop-index="86" />
Review comment:
this 2 lines should be deleted. other case will change like this. so,should i add TODO comment.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397740522
##########
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_alias_as_keyword".equals(sqlCaseId) && "MySQL".equals(databaseType)) {
+ System.out.println("dadf");
Review comment:
Delete` system out`.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397733820
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +493,73 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
- ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
- }
+ TableFactorSegment tableFactor = (TableFactorSegment) visit(ctx.tableFactor());
+ result.setTableFactor(tableFactor);
}
- if (null != ctx.joinedTable()) {
+ if (!ctx.joinedTable().isEmpty()) {
for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ JoinedTableSegment joinedTableSegment = (JoinedTableSegment) visit(each);
+ result.getJoinedTables().add(joinedTableSegment);
}
}
return result;
}
@Override
public ASTNode visitTableFactor(final TableFactorContext ctx) {
+ TableFactorSegment result = new TableFactorSegment();
+ if (null != ctx.subquery()) {
+ SelectStatement subquery = (SelectStatement) visit(ctx.subquery());
+ result.setSubquery(new SubquerySegment(ctx.subquery().start.getStartIndex(), ctx.subquery().stop.getStopIndex(), subquery));
Review comment:
Please use `SubqueryTableSegment`
----------------------------------------------------------------
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 #4916:
add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603784997
@tristaZero I have changed base comment,please review.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397594875
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +495,67 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
+ if (null != tableFactor) {
+ result.setTable((TableSegment) tableFactor);
}
}
- if (null != ctx.joinedTable()) {
- for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ if (!ctx.joinedTable().isEmpty()) {
+ for (JoinedTableContext jc : ctx.joinedTable()) {
+ JoinedTableSegment joinedTableSegment = (JoinedTableSegment) visit(jc);
+ result.getJoinedTables().add(joinedTableSegment);
}
}
return result;
}
@Override
public ASTNode visitTableFactor(final TableFactorContext ctx) {
+ if (null != ctx.subquery()) {
+ visit(ctx.subquery());
+ }
if (null != ctx.tableName()) {
SimpleTableSegment result = (SimpleTableSegment) visit(ctx.tableName());
if (null != ctx.alias()) {
result.setAlias((AliasSegment) visit(ctx.alias()));
}
return result;
}
- if (null != ctx.tableReferences()) {
- return visit(ctx.tableReferences());
- }
- SubqueryTableSegment result = new SubqueryTableSegment(new SubquerySegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), (SelectStatement) visit(ctx.subquery())));
Review comment:
How to handle the `alias` for `subquery`?
----------------------------------------------------------------
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
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603160941
## Pull Request Test Coverage Report for [Build 10568](https://coveralls.io/builds/29604377)
* **0** of **72** **(0.0%)** changed or added relevant lines in **6** files are covered.
* **53** unchanged lines in **9** files lost coverage.
* Overall coverage decreased (**-0.2%**) to **57.973%**
---
| 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/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L48) | 0 | 1 | 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/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L31) | 0 | 2 | 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/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L31) | 0 | 3 | 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/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L28) | 0 | 5 | 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/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L30) | 0 | 12 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L209) | 0 | 49 | 0.0%
<!-- | **Total:** | **0** | **72** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29604377/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L142) | 1 | 93.18% |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29604377/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L69) | 1 | 95.65% |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29604377/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29604377/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L294) | 3 | 0% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java](https://coveralls.io/builds/29604377/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FTableRule.java#L160) | 5 | 89.77% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29604377/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L116) | 7 | 76.47% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29604377/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L374) | 8 | 85.21% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java](https://coveralls.io/builds/29604377/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FMemoryChannel.java#L61) | 8 | 51.85% |
| [sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/ShardingRouteDecorator.java](https://coveralls.io/builds/29604377/source?filename=sharding-core%2Fsharding-core-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2FShardingRouteDecorator.java#L65) | 17 | 32.14% |
<!-- | **Total:** | **53** | | -->
| Totals | [](https://coveralls.io/builds/29604377) |
| :-- | --: |
| Change from base [Build 1155](https://coveralls.io/builds/29574204): | -0.2% |
| Covered Lines: | 11874 |
| Relevant Lines: | 20482 |
---
##### 💛 - [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] codecov-io commented on issue #4916: add
tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603157625
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=h1) Report
> Merging [#4916](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/806c231f30585a382d5dfdc5a0637c3df0bd1a68&el=desc) will **decrease** coverage by `0.18%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4916 +/- ##
============================================
- Coverage 54.65% 54.47% -0.19%
- Complexity 436 441 +5
============================================
Files 1138 1140 +2
Lines 20403 20473 +70
Branches 3750 3762 +12
============================================
+ Hits 11152 11153 +1
- Misses 8547 8612 +65
- Partials 704 708 +4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL2ltcGwvTXlTUUxETUxWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...rser/sql/segment/dml/JoinSpecificationSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pblNwZWNpZmljYXRpb25TZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...sql/parser/sql/segment/dml/JoinedTableSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pbmVkVGFibGVTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../parser/sql/segment/dml/TableReferenceSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVSZWZlcmVuY2VTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../sql/parser/sql/statement/dml/SelectStatement.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc3RhdGVtZW50L2RtbC9TZWxlY3RTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...or/impl/keygen/BaseGeneratedKeyTokenGenerator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3Jld3JpdGUvdG9rZW4vZ2VuZXJhdG9yL2ltcGwva2V5Z2VuL0Jhc2VHZW5lcmF0ZWRLZXlUb2tlbkdlbmVyYXRvci5qYXZh) | `66.66% <0.00%> (-16.67%)` | `1.00% <0.00%> (ø%)` | |
| [...phere/sharding/merge/dql/orderby/OrderByValue.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvb3JkZXJieS9PcmRlckJ5VmFsdWUuamF2YQ==) | `83.67% <0.00%> (-9.88%)` | `0.00% <0.00%> (ø%)` | |
| [.../sharding/route/engine/ShardingRouteDecorator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJvdXRlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9yb3V0ZS9lbmdpbmUvU2hhcmRpbmdSb3V0ZURlY29yYXRvci5qYXZh) | `23.21% <0.00%> (-3.91%)` | `0.00% <0.00%> (ø%)` | |
| [...r/binder/statement/dml/InsertStatementContext.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWJpbmRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9iaW5kZXIvc3RhdGVtZW50L2RtbC9JbnNlcnRTdGF0ZW1lbnRDb250ZXh0LmphdmE=) | `86.36% <0.00%> (-3.64%)` | `0.00% <0.00%> (ø%)` | |
| [...g/merge/dql/groupby/GroupByMemoryMergedResult.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvZ3JvdXBieS9Hcm91cEJ5TWVtb3J5TWVyZ2VkUmVzdWx0LmphdmE=) | `93.10% <0.00%> (-2.82%)` | `1.00% <0.00%> (ø%)` | |
| ... and [43 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=footer). Last update [806c231...0b41af1](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397595446
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.sql.segment.dml;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.sql.segment.SQLSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.TableSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+@Getter
+@Setter
+public final class TableReferenceSegment implements SQLSegment {
+
+ private int startIndex;
+
+ private int stopIndex;
+
+ private TableSegment table;
+
+ private final Collection<JoinedTableSegment> joinedTables = new LinkedList<>();
+
+ private final Collection<SimpleTableSegment> tables = new LinkedList<>();
Review comment:
Is it likely to remove this member?
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397625442
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.sql.segment.dml;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.sql.segment.SQLSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.TableSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+@Getter
+@Setter
+public final class TableReferenceSegment implements SQLSegment {
+
+ private int startIndex;
+
+ private int stopIndex;
+
+ private TableSegment table;
+
+ private final Collection<JoinedTableSegment> joinedTables = new LinkedList<>();
+
+ private final Collection<SimpleTableSegment> tables = new LinkedList<>();
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 merged pull request #4916:
add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397629048
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +495,67 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
+ if (null != tableFactor) {
+ result.setTable((TableSegment) tableFactor);
}
}
- if (null != ctx.joinedTable()) {
- for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ if (!ctx.joinedTable().isEmpty()) {
+ for (JoinedTableContext jc : ctx.joinedTable()) {
+ JoinedTableSegment joinedTableSegment = (JoinedTableSegment) visit(jc);
+ result.getJoinedTables().add(joinedTableSegment);
}
}
return result;
}
@Override
public ASTNode visitTableFactor(final TableFactorContext ctx) {
+ if (null != ctx.subquery()) {
+ visit(ctx.subquery());
+ }
if (null != ctx.tableName()) {
SimpleTableSegment result = (SimpleTableSegment) visit(ctx.tableName());
if (null != ctx.alias()) {
result.setAlias((AliasSegment) visit(ctx.alias()));
}
return result;
}
- if (null != ctx.tableReferences()) {
Review comment:
I'll add 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397739095
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableReferenceSegment.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.sql.segment.dml;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.sql.segment.SQLSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.TableSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+@Getter
+@Setter
+public final class TableReferenceSegment implements SQLSegment {
+
+ private int startIndex;
+
+ private int stopIndex;
+
+ private TableSegment table;
+
+ private final Collection<JoinedTableSegment> joinedTables = new LinkedList<>();
+
+ private final Collection<SimpleTableSegment> tables = new LinkedList<>();
Review comment:
So? Why not now?
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397628231
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-join.xml
##########
@@ -48,8 +48,8 @@
<simple-table name="t_order" start-index="27" stop-index="33" />
<simple-table name="t_order_item" start-index="40" stop-index="51" />
<!-- FIXME should not has table segment for owner -->
- <simple-table name="t_order" start-index="56" stop-index="62" />
- <simple-table name="t_order_item" start-index="75" stop-index="86" />
Review comment:
this 2 lines should be deleted. other case will change like this. so,should i add TODO comment?
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597340
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -201,7 +204,11 @@ public ASTNode visitOnDuplicateKeyClause(final OnDuplicateKeyClauseContext ctx)
@Override
public ASTNode visitUpdate(final UpdateContext ctx) {
UpdateStatement result = new UpdateStatement();
- result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences())).getValue());
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.tableReferences());
+ for (TableReferenceSegment t : tableReferences.getValue()) {
+ result.getTables().addAll(t.getTables());
+ }
+// result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences())).getValue());
Review comment:
Why did not you comment on this sentence instead of deleting 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597065
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -315,7 +326,12 @@ public ASTNode visitSelectClause(final SelectClauseContext ctx) {
result.getProjections().setDistinctRow(isDistinct(ctx));
}
if (null != ctx.fromClause()) {
- result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.fromClause())).getValue());
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.fromClause());
+ for (TableReferenceSegment t : tableReferences.getValue()) {
+ result.getTables().addAll(t.getTables());
+ result.getTableReferences().add(t);
+ }
+// result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.fromClause())).getValue());
Review comment:
Why did not you comment on this sentence instead of deleting 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] codecov-io edited a comment on issue
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603157625
# [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=h1) Report
> Merging [#4916](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-shardingsphere/commit/806c231f30585a382d5dfdc5a0637c3df0bd1a68&el=desc) will **decrease** coverage by `0.20%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4916 +/- ##
============================================
- Coverage 54.65% 54.45% -0.21%
- Complexity 436 440 +4
============================================
Files 1138 1140 +2
Lines 20403 20482 +79
Branches 3750 3765 +15
============================================
+ Hits 11152 11154 +2
- Misses 8547 8620 +73
- Partials 704 708 +4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL2ltcGwvTXlTUUxETUxWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...rser/sql/segment/dml/JoinSpecificationSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pblNwZWNpZmljYXRpb25TZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...sql/parser/sql/segment/dml/JoinedTableSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvSm9pbmVkVGFibGVTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [...sql/parser/sql/segment/dml/TableFactorSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVGYWN0b3JTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../parser/sql/segment/dml/TableReferenceSegment.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc2VnbWVudC9kbWwvVGFibGVSZWZlcmVuY2VTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
| [.../sql/parser/sql/statement/dml/SelectStatement.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvc3RhdGVtZW50L2RtbC9TZWxlY3RTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
| [...or/impl/keygen/BaseGeneratedKeyTokenGenerator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJld3JpdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3Jld3JpdGUvdG9rZW4vZ2VuZXJhdG9yL2ltcGwva2V5Z2VuL0Jhc2VHZW5lcmF0ZWRLZXlUb2tlbkdlbmVyYXRvci5qYXZh) | `66.66% <0.00%> (-16.67%)` | `1.00% <0.00%> (ø%)` | |
| [...phere/sharding/merge/dql/orderby/OrderByValue.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLW1lcmdlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9tZXJnZS9kcWwvb3JkZXJieS9PcmRlckJ5VmFsdWUuamF2YQ==) | `83.67% <0.00%> (-9.88%)` | `0.00% <0.00%> (ø%)` | |
| [.../sharding/route/engine/ShardingRouteDecorator.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLXJvdXRlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9yb3V0ZS9lbmdpbmUvU2hhcmRpbmdSb3V0ZURlY29yYXRvci5qYXZh) | `23.21% <0.00%> (-3.91%)` | `0.00% <0.00%> (ø%)` | |
| [...r/binder/statement/dml/InsertStatementContext.java](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWJpbmRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9iaW5kZXIvc3RhdGVtZW50L2RtbC9JbnNlcnRTdGF0ZW1lbnRDb250ZXh0LmphdmE=) | `86.36% <0.00%> (-3.64%)` | `0.00% <0.00%> (ø%)` | |
| ... and [53 more](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=footer). Last update [806c231...7377aa5](https://codecov.io/gh/apache/incubator-shardingsphere/pull/4916?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397740777
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java
##########
@@ -44,6 +45,8 @@
private ProjectionsSegment projections;
+ private final Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
Review comment:
Why do not you delete them right now?
----------------------------------------------------------------
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
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603160941
## Pull Request Test Coverage Report for [Build 2224](https://coveralls.io/builds/29597914)
* **0** of **55** **(0.0%)** changed or added relevant lines in **5** files are covered.
* **35** unchanged lines in **6** files lost coverage.
* Overall coverage decreased (**-0.06%**) to **58.068%**
---
| 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/JoinedTableSegment.java](https://coveralls.io/builds/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L27) | 0 | 1 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java](https://coveralls.io/builds/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L48) | 0 | 1 | 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/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L31) | 0 | 2 | 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/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L31) | 0 | 11 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L207) | 0 | 40 | 0.0%
<!-- | **Total:** | **0** | **55** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29597914/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L70) | 1 | 94.44% |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29597914/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L116) | 2 | 93.48% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java](https://coveralls.io/builds/29597914/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FTableRule.java#L164) | 3 | 90.53% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29597914/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L294) | 4 | 0% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29597914/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L374) | 8 | 85.21% |
| [sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/ShardingRouteDecorator.java](https://coveralls.io/builds/29597914/source?filename=sharding-core%2Fsharding-core-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2FShardingRouteDecorator.java#L65) | 17 | 32.14% |
<!-- | **Total:** | **35** | | -->
| Totals | [](https://coveralls.io/builds/29597914) |
| :-- | --: |
| Change from base [Build 1155](https://coveralls.io/builds/29574204): | -0.06% |
| Covered Lines: | 11887 |
| Relevant Lines: | 20471 |
---
##### 💛 - [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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597656
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +495,67 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
+ if (null != tableFactor) {
+ result.setTable((TableSegment) tableFactor);
}
}
- if (null != ctx.joinedTable()) {
- for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ if (!ctx.joinedTable().isEmpty()) {
+ for (JoinedTableContext jc : ctx.joinedTable()) {
Review comment:
Please use the value named `each` for `for loop`.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397790533
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java
##########
@@ -44,6 +45,8 @@
private ProjectionsSegment projections;
+ private final Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
Review comment:
It has been deleted.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397594699
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -479,78 +495,67 @@ public ASTNode visitEscapedTableReference(final EscapedTableReferenceContext ctx
@Override
public ASTNode visitTableReference(final TableReferenceContext ctx) {
- CollectionValue<SimpleTableSegment> result = new CollectionValue<>();
+ TableReferenceSegment result = new TableReferenceSegment();
if (null != ctx.tableFactor()) {
- // TODO :Ignore subquery table segment
ASTNode tableFactor = visit(ctx.tableFactor());
- if (tableFactor instanceof SimpleTableSegment) {
- result.getValue().add((SimpleTableSegment) tableFactor);
+ if (null != tableFactor) {
+ result.setTable((TableSegment) tableFactor);
}
}
- if (null != ctx.joinedTable()) {
- for (JoinedTableContext each : ctx.joinedTable()) {
- result.getValue().addAll(getTableSegments(result.getValue(), each));
+ if (!ctx.joinedTable().isEmpty()) {
+ for (JoinedTableContext jc : ctx.joinedTable()) {
+ JoinedTableSegment joinedTableSegment = (JoinedTableSegment) visit(jc);
+ result.getJoinedTables().add(joinedTableSegment);
}
}
return result;
}
@Override
public ASTNode visitTableFactor(final TableFactorContext ctx) {
+ if (null != ctx.subquery()) {
+ visit(ctx.subquery());
+ }
if (null != ctx.tableName()) {
SimpleTableSegment result = (SimpleTableSegment) visit(ctx.tableName());
if (null != ctx.alias()) {
result.setAlias((AliasSegment) visit(ctx.alias()));
}
return result;
}
- if (null != ctx.tableReferences()) {
Review comment:
The definition of `tableFactor` in `DMLStatement.g4` shows this can happen, why do you remove 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397741574
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/TableFactorSegment.java
##########
@@ -0,0 +1,47 @@
+/*
+ * 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.sql.segment.dml;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.sql.parser.sql.segment.SQLSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.subquery.SubquerySegment;
+import org.apache.shardingsphere.sql.parser.sql.segment.generic.table.TableSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+@Getter
+@Setter
+public final class TableFactorSegment implements SQLSegment {
+
+ private int startIndex;
+
+ private int stopIndex;
+
+ private TableSegment table;
Review comment:
Two of `SimpleTableSegment` and `SubqueryTableSegment` implement `TableSegment` and have `Alias` which means you can remove `alias` and `subquery` from this class, 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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397596628
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/dml/select-join.xml
##########
@@ -48,8 +48,8 @@
<simple-table name="t_order" start-index="27" stop-index="33" />
<simple-table name="t_order_item" start-index="40" stop-index="51" />
<!-- FIXME should not has table segment for owner -->
- <simple-table name="t_order" start-index="56" stop-index="62" />
- <simple-table name="t_order_item" start-index="75" stop-index="86" />
Review comment:
Please add `TODO comment` to avoid forgetting this issue here.
----------------------------------------------------------------
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
jingshanglu commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397625686
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dml/SelectStatement.java
##########
@@ -44,6 +45,8 @@
private ProjectionsSegment projections;
+ private final Collection<TableReferenceSegment> tableReferences = new LinkedList<>();
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 #4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397728755
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
##########
@@ -201,7 +205,10 @@ public ASTNode visitOnDuplicateKeyClause(final OnDuplicateKeyClauseContext ctx)
@Override
public ASTNode visitUpdate(final UpdateContext ctx) {
UpdateStatement result = new UpdateStatement();
- result.getTables().addAll(((CollectionValue<SimpleTableSegment>) visit(ctx.tableReferences())).getValue());
+ CollectionValue<TableReferenceSegment> tableReferences = (CollectionValue<TableReferenceSegment>) visit(ctx.tableReferences());
Review comment:
Use `each` value name for `for loop`.
----------------------------------------------------------------
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
#4916: add tableReferences in selectStatement
Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4916: add tableReferences in selectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/4916#issuecomment-603160941
## Pull Request Test Coverage Report for [Build 10548](https://coveralls.io/builds/29599766)
* **0** of **69** **(0.0%)** changed or added relevant lines in **6** files are covered.
* **52** unchanged lines in **9** files lost coverage.
* Overall coverage decreased (**-0.1%**) to **57.99%**
---
| 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/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fdml%2FSelectStatement.java#L48) | 0 | 1 | 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/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinSpecificationSegment.java#L31) | 0 | 2 | 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/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableFactorSegment.java#L32) | 0 | 3 | 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/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FJoinedTableSegment.java#L27) | 0 | 4 | 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/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fsegment%2Fdml%2FTableReferenceSegment.java#L30) | 0 | 12 | 0.0%
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L208) | 0 | 47 | 0.0%
<!-- | **Total:** | **0** | **69** | **0.0%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/engine/ShardingSQLRewriteEngine.java](https://coveralls.io/builds/29599766/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Fengine%2FShardingSQLRewriteEngine.java#L70) | 1 | 94.44% |
| [sharding-core/sharding-core-entry/src/main/java/org/apache/shardingsphere/core/shard/BaseShardingEngine.java](https://coveralls.io/builds/29599766/source?filename=sharding-core%2Fsharding-core-entry%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fshard%2FBaseShardingEngine.java#L116) | 2 | 93.48% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/TableRule.java](https://coveralls.io/builds/29599766/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FTableRule.java#L164) | 3 | 90.53% |
| [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29599766/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
| [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/29599766/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L293) | 3 | 0% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29599766/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L116) | 7 | 76.47% |
| [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java](https://coveralls.io/builds/29599766/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Frule%2FShardingRule.java#L374) | 8 | 85.21% |
| [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java](https://coveralls.io/builds/29599766/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FMemoryChannel.java#L61) | 8 | 51.85% |
| [sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/ShardingRouteDecorator.java](https://coveralls.io/builds/29599766/source?filename=sharding-core%2Fsharding-core-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Froute%2Fengine%2FShardingRouteDecorator.java#L65) | 17 | 32.14% |
<!-- | **Total:** | **52** | | -->
| Totals | [](https://coveralls.io/builds/29599766) |
| :-- | --: |
| Change from base [Build 1155](https://coveralls.io/builds/29574204): | -0.1% |
| Covered Lines: | 11878 |
| Relevant Lines: | 20483 |
---
##### 💛 - [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