Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.21.0
-
None
-
None
Description
For instance:
1) select from emp e left join dept d on (e.X = d.id)
This query can't multiply rows, so its row count estimation is rowCount(join.left)
2) select from dept d right join emp e on (d.id = e.X)
This query can't multiply rows, so its row count estimation is rowCount(join.right)
3) select from emp e join dept d on (e.id = d.id)
The rows can't be multiplied here as well
Currently, Calcite estimates the number of rows as left*right which is an overestimation in many cases