EmmyMiao87 opened a new issue #8778:
URL: https://github.com/apache/incubator-doris/issues/8778


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   Doris 1.0
   
   ### What's Wrong?
   
   The duplicate result appears in query 'rollup + more then 1 concurrency '.
   
   
   ### What You Expected?
   
   Rollup without duplicate result.
   
   ### How to Reproduce?
   
   1. create table 
   
   ```
   CREATE TABLE `t1` (
     `tc1` int(11) NULL COMMENT "",
     `tc2` int(11) NULL COMMENT "",
     `tc3` int(11) NULL COMMENT ""
   ) ENGINE=OLAP
   DUPLICATE KEY(`tc1`, `tc2`, `tc3`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`tc1`) BUCKETS 10
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   )
   ```
   2. set currency to 2
   
   ```
   set parallel_fragment_exec_instance_num=2;
   set disable_colocate_plan=false
   ``` 
   
   3. insert data
   
   ```
   insert into t1 values(1,2,1),(1,3,1),(2,1,1),(3,1,1);
   ```
   
   4. query
   
   ```
   select t1.tc1,t1.tc2,sum(t1.tc3) as total from t1 join[shuffle] t1 t2 on 
t1.tc1=t2.tc1 group by rollup(tc1,tc2) order by t1.tc1,t1.tc2,total;
   ```
   
   5. error duplicate result
   
   ```
   +------+------+-------+
   | tc1  | tc2  | total |
   +------+------+-------+
   | NULL | NULL |     4 |
   |    1 | NULL |     3 |
   | NULL | NULL |     2 |
   |    1 | NULL |     1 |
   |    1 |    2 |     2 |
   |    1 |    3 |     2 |
   |    2 | NULL |     1 |
   |    2 |    1 |     1 |
   |    3 | NULL |     1 |
   |    3 |    1 |     1 |
   +------+------+-------+
   8 rows in set (27.107 sec)
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to