xiedeyantu commented on PR #4785: URL: https://github.com/apache/calcite/pull/4785#issuecomment-3850141405
This SQL query actually comes from [CALCITE-6452](https://issues.apache.org/jira/browse/CALCITE-6452). Jira should currently be working correctly, but due to a cost model issue, it's selecting MergeJoin. From the DAG, it's clear that MergeJoin has about 7 fewer rows than HashJoin, but consumes 6 times more CPU. The current cost model ignores CPU usage, hence selecting MergeJoin. Although the cost model is flawed, this error should still be fixed. ``` rel#207 (EnumerableHashJoin): rows=14.209999999999999 cost={222.6832026146136 rows, 204.2 cpu, 0.0 io} rel#213 (EnumerableMergeJoin): rows=14.209999999999999 cost={215.13639999999998 rows, 1272.3104732091813 cpu, 0.0 io} ``` -- 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]
