strongduanmu commented on issue #7052:
URL: https://github.com/apache/shardingsphere/issues/7052#issuecomment-680400928


   @seowen808 Hi, the result of this SQL routing in the master branch is 
correct. I think you can wait for the 5.x release version.
   
   ```sql
   [INFO ] 09:02:35.586 [ShardingSphere-Command-4] ShardingSphere-SQL - Logic 
SQL: /* ApplicationName=DataGrip 2020.2 */ select count(1) from (SELECT * FROM 
t_order WHERE order_id IN (1, 2, 3) GROUP BY order_id ORDER BY order_id) total
   [INFO ] 09:02:35.586 [ShardingSphere-Command-4] ShardingSphere-SQL - 
SQLStatement: 
SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@1f899838,
 
tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=74,
 stopIndex=80, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), 
owner=Optional.empty, alias=Optional.empty)])), 
tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=74,
 stopIndex=80, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), 
owner=Optional.empty, alias=Optional.empty)]), 
projectionsContext=ProjectionsContext(startIndex=45, stopIndex=52, 
distinctRow=false, projections=[AggregationProjection(type=COUNT, 
innerExpression=(1), alias=Optional.empty, derivedAggregationProjections=[], 
index=-1)]), 
groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByCont
 ext@6fb7b5f5, 
orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@5e1431a7,
 
paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@6b45692d,
 containsSubquery=true)
   [INFO ] 09:02:35.586 [ShardingSphere-Command-4] ShardingSphere-SQL - Actual 
SQL: ds ::: /* ApplicationName=DataGrip 2020.2 */ select count(1) from (SELECT 
* FROM t_order_0 WHERE order_id IN (1, 2, 3) GROUP BY order_id ORDER BY 
order_id) total
   [INFO ] 09:02:35.586 [ShardingSphere-Command-4] ShardingSphere-SQL - Actual 
SQL: ds ::: /* ApplicationName=DataGrip 2020.2 */ select count(1) from (SELECT 
* FROM t_order_1 WHERE order_id IN (1, 2, 3) GROUP BY order_id ORDER BY 
order_id) total
   ```


----------------------------------------------------------------
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]


Reply via email to