wutiangan opened a new pull request #4048:
URL: https://github.com/apache/incubator-doris/pull/4048


   fix #4047 
   
   #3886 has certain relevance to this case。
   
   the sql : bigtable t1 join mysqltable t2 join mysqltable t3 on t1.k1 = t3.k1
   1、after reorder:  
       t1, t2, t3
   2、choose join t1 with t2:  
      t1 join t2 with no conditions, and doris choose cross join
   3、choose join (t1 join on t2) with t3:  
    in old code, the t2 is mysqlTable, so the cardinality is zero,
   and "the cross join t1 with t2" 's cardinality is t1.cardinality multiply 
t2.cardiantiry, 
   for t2 is mysql, so t2.cardinality is zero, and "the cross join t1 with t2" 
is zero.
   t3 is mysqltable, t3's cardinatiry is zero.
   
   **If two tables need to be joined both are zero,we will choose the shuffle 
join**
   
   So I change the mysql table ‘s cardinaliry from 0 to 1,  the cross join's 
cardinality is not zero.
   
   
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to