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/04 10:16:38 UTC

[GitHub] [incubator-shardingsphere] kimmking opened a new pull request #4597: fix #4565 for distinct bug

kimmking opened a new pull request #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597
 
 
   Fixes #4565 .
   
   Changes proposed in this pull request:
   - for fix distinct bug
   

----------------------------------------------------------------
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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594439444
 
 
   ```
    ================= >Case5: distinct with groupby&orderby other columns ========>
   [INFO ] 2020-03-04 17:39:02,517 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,517 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user group by name order by id 
   [INFO ] 2020-03-04 17:39:02,517 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@1436a7ab, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@3b7b05a8), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@3b7b05a8, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=18, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty), DerivedProjection(expression=name, alias=Optional[GROUP_BY_DERIVED_0]), DerivedProjection(expression=id, alias=Optional[ORDER_BY_DERIVED_0])], columnLabels=[age]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@3d36dff4, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@7abe27bf, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@5b94ccbc, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user0 group by name order by id 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user1 group by name order by id 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user2 group by name order by id 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user0 group by name order by id 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user1 group by name order by id 
   [INFO ] 2020-03-04 17:39:02,518 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age , name AS GROUP_BY_DERIVED_0 , id AS ORDER_BY_DERIVED_0 from user2 group by name order by id 
   [11]
   [11]
   [11]
   [15]
   [11]
   [11]
   [12]
   [13]
   [11]
   [12]
   [13]
   [14]
   ```

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu merged pull request #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597
 
 
   

----------------------------------------------------------------
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 #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-595034348
 
 
   ## Pull Request Test Coverage Report for [Build 2003](https://coveralls.io/builds/29171551)
   
   * **19** of **23**   **(82.61%)**  changed or added relevant lines in **2** files are covered.
   * **2** unchanged lines in **1** file lost coverage.
   * Overall coverage increased (+**0.03%**) to **59.08%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/OrderByTokenGenerator.java](https://coveralls.io/builds/29171551/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Ftoken%2Fgenerator%2Fimpl%2FOrderByTokenGenerator.java#L66) | 3 | 7 | 42.86%
   <!-- | **Total:** | **19** | **23** | **82.61%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/util/IpUtils.java](https://coveralls.io/builds/29171551/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Finternal%2Futil%2FIpUtils.java#L72) | 2 | 80.0% |
   <!-- | **Total:** | **2** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29171551/badge)](https://coveralls.io/builds/29171551) |
   | :-- | --: |
   | Change from base [Build 10065](https://coveralls.io/builds/29169228): |  0.03% |
   | Covered Lines: | 12122 |
   | Relevant Lines: | 20518 |
   
   ---
   ##### 💛  - [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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594439567
 
 
   ```
    ================= >Case6: 2 columns for distinct only ========>
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age,name from user 
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@2f5c1332, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@7ec25216), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@7ec25216, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=23, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty), ColumnProjection(owner=null, name=name, alias=Optional.empty)], columnLabels=[age, name]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@7cab1508, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@6a84bc3f, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@258ee7de, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age,name from user0 ORDER BY age ASC,name ASC  
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age,name from user1 ORDER BY age ASC,name ASC  
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age,name from user2 ORDER BY age ASC,name ASC  
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age,name from user0 ORDER BY age ASC,name ASC  
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age,name from user1 ORDER BY age ASC,name ASC  
   [INFO ] 2020-03-04 17:39:02,561 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age,name from user2 ORDER BY age ASC,name ASC  
   [name-14, 10]
   [name-11, 11]
   [name-12, 11]
   [name-13, 11]
   [name-21, 11]
   [name-22, 11]
   [name-31, 11]
   [name-23, 12]
   [name-32, 12]
   [name-24, 13]
   [name-33, 13]
   [name-14, 14]
   [name-34, 14]
   [name-14, 15]
   [name-14, 16]
   [name-14, 17]
   ```

----------------------------------------------------------------
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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594438291
 
 
   [distinct.txt](https://github.com/apache/incubator-shardingsphere/files/4286703/distinct.txt)
   
   Using 2 databases, 3 tables of each.
   >  insert into user(`name`,`age`) values ('name-11',11),('name-12',11),('name-13',11),('name-14',14),[INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user2(`name`,`age`, id) values ('name-11', 11, 442017321611952128) 
   [INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user0(`name`,`age`, id) values ('name-12', 11, 442017321611952129) 
   [INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user1(`name`,`age`, id) values ('name-13', 11, 442017321611952130) 
   [INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user2(`name`,`age`, id) values ('name-14', 14, 442017321611952131) 
   [INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user0(`name`,`age`, id) values ('name-14', 15, 442017321611952132) 
   [INFO ] 2020-03-04 17:39:01,925 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user1(`name`,`age`, id) values ('name-14', 10, 442017321611952133) 
   
   > ('name-21',11),('name-22',11),('name-23',12),('name-24',13),('name-14',15),('name-14',17)
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user0(`name`,`age`, id) values ('name-21', 11, 442017322996072449) 
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user1(`name`,`age`, id) values ('name-22', 11, 442017322996072450) 
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user2(`name`,`age`, id) values ('name-23', 12, 442017322996072451) 
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user0(`name`,`age`, id) values ('name-24', 13, 442017322996072452) 
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user1(`name`,`age`, id) values ('name-14', 15, 442017322996072453) 
   [INFO ] 2020-03-04 17:39:02,092 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user2(`name`,`age`, id) values ('name-14', 17, 442017322996072454) 
   
   >insert into user(`name`,`age`) values ('name-31',11),('name-32',12),('name-33',13),('name-34',14),('name-14',15),('name-14',16) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user2(`name`,`age`, id) values ('name-31', 11, 442017323713298432) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user0(`name`,`age`, id) values ('name-32', 12, 442017323713298433) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user1(`name`,`age`, id) values ('name-33', 13, 442017323713298434) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user2(`name`,`age`, id) values ('name-34', 14, 442017323713298435) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: insert into user0(`name`,`age`, id) values ('name-14', 15, 442017323713298436) 
   [INFO ] 2020-03-04 17:39:02,264 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: insert into user1(`name`,`age`, id) values ('name-14', 16, 442017323713298437) 
   
   

----------------------------------------------------------------
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] kimmking edited a comment on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594438718
 
 
   ```
    ================= >Case1: distinct only ========>
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,424 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 ORDER BY age ASC  
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]
   ```

----------------------------------------------------------------
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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594439299
 
 
   ```
    ================= >Case4: distinct with groupby&orderby ========>
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@39109136, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@27c04377), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@27c04377, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=18, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty)], columnLabels=[age]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@34dc85a, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@67403656, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@5a6482a9, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 group by age order by age 
   [INFO ] 2020-03-04 17:39:02,504 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 group by age order by age 
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]
   ```

----------------------------------------------------------------
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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594439198
 
 
   ```
   ================= >Case3: distinct with orderby ========>
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@99a78d7, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@31da6b2e), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@31da6b2e, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=18, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty)], columnLabels=[age]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@61c76850, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@70242f38, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@2a22ad2b, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 order by age 
   [INFO ] 2020-03-04 17:39:02,495 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 order by age 
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]
   ```

----------------------------------------------------------------
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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594439066
 
 
   ```
   ================= >Case2: distinct with groupby ========>
   [INFO ] 2020-03-04 17:39:02,483 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user group by age 
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4ba89729, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@178270b2), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@178270b2, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=18, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty)], columnLabels=[age]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@795fd838, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@1b005a0b, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@141e879d, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 group by age ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 group by age ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 group by age ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 group by age ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 group by age ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,484 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 group by age ORDER BY age ASC  
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]
   ```

----------------------------------------------------------------
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 #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-595034348
 
 
   ## Pull Request Test Coverage Report for [Build 1986](https://coveralls.io/builds/29143116)
   
   * **19** of **23**   **(82.61%)**  changed or added relevant lines in **2** files are covered.
   * **1** unchanged line in **1** file lost coverage.
   * Overall coverage increased (+**0.02%**) to **57.831%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/OrderByTokenGenerator.java](https://coveralls.io/builds/29143116/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Ftoken%2Fgenerator%2Fimpl%2FOrderByTokenGenerator.java#L66) | 3 | 7 | 42.86%
   <!-- | **Total:** | **19** | **23** | **82.61%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-orchestration/sharding-orchestration-center/sharding-orchestration-center-apollo/src/main/java/org/apache/shardingsphere/orchestration/center/instance/ApolloInstance.java](https://coveralls.io/builds/29143116/source?filename=sharding-orchestration%2Fsharding-orchestration-center%2Fsharding-orchestration-center-apollo%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcenter%2Finstance%2FApolloInstance.java#L112) | 1 | 59.46% |
   <!-- | **Total:** | **1** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29143116/badge)](https://coveralls.io/builds/29143116) |
   | :-- | --: |
   | Change from base [Build 982](https://coveralls.io/builds/29120789): |  0.02% |
   | Covered Lines: | 10413 |
   | Relevant Lines: | 18006 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls edited a comment on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-595034348
 
 
   ## Pull Request Test Coverage Report for [Build 10069](https://coveralls.io/builds/29171549)
   
   * **19** of **23**   **(82.61%)**  changed or added relevant lines in **2** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.02%**) to **59.075%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/OrderByTokenGenerator.java](https://coveralls.io/builds/29171549/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Ftoken%2Fgenerator%2Fimpl%2FOrderByTokenGenerator.java#L66) | 3 | 7 | 42.86%
   <!-- | **Total:** | **19** | **23** | **82.61%** | -->
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29171549/badge)](https://coveralls.io/builds/29171549) |
   | :-- | --: |
   | Change from base [Build 10065](https://coveralls.io/builds/29169228): |  0.02% |
   | Covered Lines: | 12121 |
   | Relevant Lines: | 20518 |
   
   ---
   ##### 💛  - [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] kimmking commented on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594438718
 
 
    ================= >Case1: distinct only ========>
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,424 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 ORDER BY age ASC  
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]

----------------------------------------------------------------
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] kimmking edited a comment on issue #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-594438718
 
 
   ```
    ================= >Case1: distinct only ========>
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Rule Type: sharding 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Logic SQL: select distinct age from user 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4a29f290, tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@4bee18dc), tablesContext=org.apache.shardingsphere.sql.parser.relation.segment.table.TablesContext@4bee18dc, projectionsContext=ProjectionsContext(startIndex=16, stopIndex=18, distinctRow=true, projections=[ColumnProjection(owner=null, name=age, alias=Optional.empty)], columnLabels=[age]), groupByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.groupby.GroupByContext@44f3fe83, orderByContext=org.apache.shardingsphere.sql.parser.relation.segment.select.orderby.OrderByContext@44c5a16f, paginationContext=org.apache.shardingsphere.sql.parser.relation.segment.select.pagination.PaginationContext@417d6615, containsSubquery=false) 
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_0 ::: select distinct age from user2 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user0 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,423 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user1 ORDER BY age ASC  
   [INFO ] 2020-03-04 17:39:02,424 --main-- [ShardingSphere-SQL] Actual SQL: ds_1 ::: select distinct age from user2 ORDER BY age ASC  
   [10]
   [11]
   [12]
   [13]
   [14]
   [15]
   [16]
   [17]
   ```

----------------------------------------------------------------
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 #4597: fix #4565 for distinct bug

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on issue #4597: fix #4565 for distinct bug
URL: https://github.com/apache/incubator-shardingsphere/pull/4597#issuecomment-595034348
 
 
   ## Pull Request Test Coverage Report for [Build 2004](https://coveralls.io/builds/29171978)
   
   * **19** of **23**   **(82.61%)**  changed or added relevant lines in **2** files are covered.
   * **86** unchanged lines in **10** files lost coverage.
   * Overall coverage increased (+**0.1%**) to **59.159%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/generator/impl/OrderByTokenGenerator.java](https://coveralls.io/builds/29171978/source?filename=sharding-core%2Fsharding-core-rewrite%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsharding%2Frewrite%2Ftoken%2Fgenerator%2Fimpl%2FOrderByTokenGenerator.java#L66) | 3 | 7 | 42.86%
   <!-- | **Total:** | **19** | **23** | **82.61%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/writer/AbstractJDBCWriter.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fwriter%2FAbstractJDBCWriter.java#L129) | 1 | 92.06% |
   | [sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/util/IpUtils.java](https://coveralls.io/builds/29171978/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Finternal%2Futil%2FIpUtils.java#L72) | 2 | 80.0% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L98) | 3 | 90.2% |
   | [sharding-scaling/sharding-scaling-mysql/src/main/java/org/apache/shardingsphere/shardingscaling/mysql/binlog/codec/DateAndTimeValueDecoder.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fmysql%2Fbinlog%2Fcodec%2FDateAndTimeValueDecoder.java#L115) | 3 | 96.46% |
   | [sharding-scaling/sharding-scaling-bootstrap/src/main/java/org/apache/shardingsphere/shardingscaling/web/HttpServerHandler.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-bootstrap%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fweb%2FHttpServerHandler.java#L102) | 5 | 91.43% |
   | [sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/AbstractStatementExecutor.java](https://coveralls.io/builds/29171978/source?filename=sharding-jdbc%2Fsharding-jdbc-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingjdbc%2Fexecutor%2FAbstractStatementExecutor.java#L227) | 6 | 47.83% |
   | [sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/schema/impl/ShardingSchema.java](https://coveralls.io/builds/29171978/source?filename=sharding-proxy%2Fsharding-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingproxy%2Fbackend%2Fschema%2Fimpl%2FShardingSchema.java#L173) | 6 | 0% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/realtime/RealtimeDataSyncTask.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Frealtime%2FRealtimeDataSyncTask.java#L45) | 14 | 0% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/controller/task/SyncTaskController.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fcontroller%2Ftask%2FSyncTaskController.java#L34) | 22 | 0% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/DistributionChannel.java](https://coveralls.io/builds/29171978/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FDistributionChannel.java#L74) | 24 | 0% |
   <!-- | **Total:** | **86** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29171978/badge)](https://coveralls.io/builds/29171978) |
   | :-- | --: |
   | Change from base [Build 10065](https://coveralls.io/builds/29169228): |  0.1% |
   | Covered Lines: | 12130 |
   | Relevant Lines: | 20504 |
   
   ---
   ##### 💛  - [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