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 2020/08/26 05:51:20 UTC

[GitHub] [shardingsphere] kimmking edited a comment on issue #6658: SELECT DISTINCT test cases error

kimmking edited a comment on issue #6658:
URL: https://github.com/apache/shardingsphere/issues/6658#issuecomment-680671377


   Case 1: shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dql/dataset/tbl/select_distinct_with_avg.xml
   
   The original sql
   ```
   SELECT AVG(DISTINCT order_id) FROM t_order WHERE order_id < 1100
   ```
   
   convert to:
   ```
   SELECT DISTINCT order_id AS AGGREGATION_DISTINCT_DERIVED_0 , order_id AS AVG_DERIVED_COUNT_0 , order_id AS AVG_DERIVED_SUM_0 FROM t_order_0 WHERE order_id < 1100
   SELECT DISTINCT order_id AS AGGREGATION_DISTINCT_DERIVED_0 , order_id AS AVG_DERIVED_COUNT_0 , order_id AS AVG_DERIVED_SUM_0 FROM t_order_1 WHERE order_id < 1100
   ......
   ```
   
   Rewriting result is wrong
   


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