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/02 01:24:43 UTC

[GitHub] [shardingsphere] dbzzzzz opened a new issue #10618: group by + having not support

dbzzzzz opened a new issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618


   ### Is your feature request related to a problem?
   group by + having does not support, the error is as below:
   mysql> select USER_ID,sum(ORDER_ID) from t_order group by USER_ID having sum(ORDER_ID)>1100;
   ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'having sum(ORDER_ID)>1100' at line 1
   
   ### Describe the feature you would like.
   


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



[GitHub] [shardingsphere] terrymanu closed issue #10618: group by + having not support

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618


   


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



[GitHub] [shardingsphere] tristaZero closed issue #10618: group by + having not support

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618


   


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



[GitHub] [shardingsphere] tristaZero closed issue #10618: group by + having not support

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618


   


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



[GitHub] [shardingsphere] strongduanmu commented on issue #10618: group by + having not support

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618#issuecomment-853774514


   PR #10620 fixes the grammatical problem of the wrong order after adding the `order by` clause when the `select ... group by ... having ... statement` is rewritten, but `having` clause is not handled correctly.
   
   ![image](https://user-images.githubusercontent.com/10829171/120632545-aad51b80-c49b-11eb-8f92-378dfa3d8111.png)
   
   We need to remove the `having` clause in the rewriting logic, and filter the having conditions after group merge.


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



[GitHub] [shardingsphere] strongduanmu commented on issue #10618: group by + having not support

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #10618:
URL: https://github.com/apache/shardingsphere/issues/10618#issuecomment-853774514


   PR #10620 fixes the grammatical problem of the wrong order after adding the `order by` clause when the `select ... group by ... having ... statement` is rewritten, but `having` clause is not handled correctly.
   
   ![image](https://user-images.githubusercontent.com/10829171/120632545-aad51b80-c49b-11eb-8f92-378dfa3d8111.png)
   
   We need to remove the `having` clause in the rewriting logic, and filter the having conditions after group merge.


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