Currently, Correlate inherits the estimateRowCount implementation from AbstractRelNode:
which gives a "default" (but unrealistic) row count computation.
This has several issues:
- This value may be used by Correlate#computeSelfCost (and by inheritance by LogicalCorrelate / EnumerableCorrelate):
- As the current state, this value will definitely by used by several join algorithms in their cost computation if their left/right child is a Correlate:
Even though cost computation is pluggable (which would help solving issues like the first one, but not issues like the second one), IMHO we should provide a more realistic default Correlate#estimateRowCount computation.