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


With regards,
Apache Git Services

Reply via email to