Afsalmc opened a new issue, #29841: URL: https://github.com/apache/shardingsphere/issues/29841
## Bug Report ### Which version of ShardingSphere did you use? 5.4.1 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior Query returns accurate results. ### Actual behavior Actual Results, not number of rows returned depends on the limit specified after group by keyword. ### Reason analyze (If you can) If the user entered query is : `SELECT COUNT(distinct Id2) C1 FROM ACCOUNT GROUP BY Id1 LIMIT 10` before querying in individual shards, the query gets converted into `SELECT distinct Id2 C1 FROM ACCOUNT LIMIT 10` hence the combined output depends on the limit value, limit value no longer has just the control over the number of rows returned but it is influencing the actual data. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. More than one Shards to reproduce the issue. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
