Skip to content

Commit 44b05c9

Browse files
committed
costIndexScanAnd no longer returns a single filter on success, it returns all of them. costIndexScanOr should check for that.
1 parent 0d7c3b5 commit 44b05c9

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
@@ -1269,7 +1269,7 @@ func (c *indexCoster) costIndexScanOr(filter *iScanOr, s sql.Statistic, buckets
12691269
if err != nil {
12701270
return nil, nil, false, err
12711271
}
1272-
if ids.Len() != 1 || !ids.Contains(int(child.Id())) {
1272+
if ids.Len() != child.childCnt() {
12731273
// scan option missed some filters
12741274
return nil, nil, false, nil
12751275
}

0 commit comments

Comments
 (0)