You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Correct computation of selectivity for multi-key joins (apache#22725)
## Which issue does this PR close?
- Closesapache#22724
## Rationale for this change
`estimate_inner_join_cardinality` sets `join_selectivity` to the
selectivity of the last join key in the list. The intent was almost
surely to instead use the selectivity of the most selective join key
instead.
## What changes are included in this PR?
* Fix formula for multi-key join selectivity estimation
* Improve comment to reference Spark Catalyst behavior more clearly
* Add unit test
## Are these changes tested?
Yes, new test added.
## Are there any user-facing changes?
No.
0 commit comments