You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/06/15 02:48:45 UTC

[GitHub] [shardingsphere] lyflyy commented on issue #10806: ## Wrong LIMIT rewrite while GROUP BY and ORDER BY

lyflyy commented on issue #10806:
URL: https://github.com/apache/shardingsphere/issues/10806#issuecomment-861128332


   @strongduangmu Thank you very much for your answer
   
   But I think if SQL were rewritten to look like this
   ```
   Actual SQL: dbs0 ::: SELECT user_id, SUM(price) `sum` FROM orders_6
   where create_time > ? and create_time < ?
   GROUP BY user_id ORDER BY `sum` DESC LIMIT 0, 10 ::: [2020-07-09 13:54:57.0, 2022-07-19 13:54:57.0]
   ```
   , and then merge all the shard data, it would also get the right result


-- 
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:
users@infra.apache.org