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


   **Describe the bug**
   Bucket shuffle join is a algorithm of joining two tables. Left table is 
distrubuted by a column. Right table sends the data to the left table for 
joining operation. It reduces the network cost. But when two join in one 
fragment, only one is bucket shuffle join cause query failed in send batch to 
`0.0.0.0:0`
   
   ```
   7:AGGREGATE (update serialize)                     |
   |   |  output: count(*)                                |
   |   |  group by:                                       |
   |   |                                                  |
   |   6:HASH JOIN                                        |
   |   |  join op: INNER JOIN (BROADCAST)                 |
   |   |  hash predicates:                                |
   |   |  colocate: false, reason: Session disabled       |
   |   |  equal join conjunct: `snv`.`k2` = `snvc`.`k2`   |
   |   |  equal join conjunct: `snv`.`k3` = `snvc`.`k3`   |
   |   |                                                  |
   |   |----10:EXCHANGE                                   |
   |   |                                                  |
   |   2:HASH JOIN                                        |
   |   |  join op: INNER JOIN (BUCKET_SHUFFLE)            |
   |   |  hash predicates:                                |
   |   |  colocate: false, reason: Session disabled       |
   |   |  equal join conjunct: `snv`.`k2` = `detail`.`k2` |
   |   |  equal join conjunct: `snv`.`k1` = `detail`.`k1` |
   |   |                                                  |
   |   |----8:EXCHANGE                                    |
   |   |                                                  |
   |   0:OlapScanNode                                     |
   |      TABLE: test                                     |
   |      PREAGGREGATION: ON                              |
   |      PREDICATES: `snv`.`k1` = 0                      |
   |      partitions=1/1                                  |
   |      rollup: test                                    |
   |      tabletRatio=1/5                                 |
   |      tabletList=13131                                |
   |      cardinality=200106                              |
   |      avgRowSize=13.486133                            |
   |      numNodes=1                  
   ```
   
   Data need to send to `10:EXCHANGE ` may failed because treat the exchange 
node as bucket shffle partition in FE.
   
   **To Reproduce**
   
   
   **To Reproduce**
   1. disable the colocate join 
   ```
   set disable_colocate_plan = true;
   ```
   
   2. execute a sql
   ```
   SELECT   count(*)  FROM   (   SELECT   snv.k2,   snv.k3,   snv.k1  FROM   
test snv    JOIN test detail ON detail.k2 = snv.k2   AND detail.k1 = snv.k1 
where snv.k1 = 0    ) snvd   JOIN (   SELECT   snvc.k2,   snvc.k3,   ds.k1  
FROM   test snvc   JOIN (   SELECT    agsdd.k1,    agsdd.k2,    agsdd.k3    
FROM    test agsdd    ) ds ON ds.k1 = snvc.k1   AND ds.k2 = snvc.k2 ) detail ON 
 detail.k2 = snvd.k2    AND detail.k3 = snvd.k3;
   ```
   
   3. see the error
   
![image](https://user-images.githubusercontent.com/10553413/104414527-6825ac00-55ab-11eb-975b-e2744ca1dc32.png)
   
   
   


-- 
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:
[email protected]



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

Reply via email to