Skip to content

Commit

Permalink
planner: fix appropriate index stats may be missed when estimating ND…
Browse files Browse the repository at this point in the history
…V for inner side of index join (#42261)

ref #31316, ref #41996
  • Loading branch information
time-and-fate authored Mar 16, 2023
1 parent 2ea6d00 commit 94903a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planner/core/exhaust_physical_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ func getColsNDVLowerBoundFromHistColl(cols []*expression.Column, histColl *stati
orderedIdxCols := make([]int64, len(idxCols))
copy(orderedIdxCols, idxCols)
slices.Sort(orderedIdxCols)
if !slices.Equal(idxCols, colUIDs) {
if !slices.Equal(orderedIdxCols, colUIDs) {
continue
}
if idxStats, ok := histColl.Indices[idxID]; ok && idxStats != nil {
Expand Down

0 comments on commit 94903a2

Please sign in to comment.