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:
[email protected]


With regards,
Apache Git Services

Reply via email to