morningman opened a new issue #3885: URL: https://github.com/apache/incubator-doris/issues/3885
**Describe the bug** When execute sql with a olap table join a mysql table, SQL planner will return a SHUFFLE join plan, which may cause a lot of network data transmission. This is because after PR #3604, the logic of selecting join method has been changed, which is, when broadcast cost equals to the shuffle cost, planner will prefer to choose SHUFFLE. But for MysqlScanNode, its cardinality is not initialized and always be -1, so the cost is not actually calculated, and both broadcast and shuffle cost is 0. which results in a SHUFFLE join. **To Reproduce** 1. create an olap table and load some data; 2. create a mysql table 3. execute a join **Expected behavior** Expect a broadcast join ---------------------------------------------------------------- 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]
