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: [email protected] With regards, Apache Git Services
