Describe the bug
estimate_join_cardinality for semi-joins checks if ANY of the columns in the two join inputs are disjoint (comparing columns positionally); if so, it claims the join will not return any rows. This is wrong, for two reasons:
- If two columns don't participate in the join key, they have no impact on the cardinality of the join result
- Comparing arbitrary columns positionally is not a sensible thing to do in the first place
A similar issue exists for anti-joins, except we assume the anti-join will return the entire join input in this case.
To Reproduce
No response
Expected behavior
No response
Additional context
No response
Describe the bug
estimate_join_cardinalityfor semi-joins checks if ANY of the columns in the two join inputs are disjoint (comparing columns positionally); if so, it claims the join will not return any rows. This is wrong, for two reasons:A similar issue exists for anti-joins, except we assume the anti-join will return the entire join input in this case.
To Reproduce
No response
Expected behavior
No response
Additional context
No response