Skip to content

Commit 2061232

Browse files
committed
costIndexScanAnd no longer returns a single filter on success, it returns all of them. costIndexScanOr should check for that.
1 parent 7f608c4 commit 2061232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/analyzer/costed_index_scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ func (c *indexCoster) costIndexScanOr(filter *iScanOr, s sql.Statistic, buckets
12851285
if err != nil {
12861286
return nil, nil, false, err
12871287
}
1288-
if ids.Len() != 1 || !ids.Contains(int(child.Id())) {
1288+
if ids.Len() != child.childCnt() {
12891289
// scan option missed some filters
12901290
return nil, nil, false, nil
12911291
}

0 commit comments

Comments
 (0)