Skip to content

Commit

Permalink
Update detacher.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ghazalfamilyusa committed Jun 14, 2024
1 parent aa03831 commit 9c7f0c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/util/ranger/detacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ func (d *rangeDetacher) detachCNFCondAndBuildRangeForIndex(conditions []expressi
// TODO: we will optimize it later.
res.RemainedConds = AppendConditionsIfNotExist(res.RemainedConds, remainedConds)
res.Ranges = ranges
// Choosing between point ranges and bestCNF is needed since bestCNF does not cover the intersection
// of all conjuncts. Even when we add support for intersection, it could be turned off by a flag or it could be
// incomplete due to a long list of conjuncts.
if bestCNFItemRes != nil && res != nil && len(res.Ranges) != 0 {
bestCNFIsSubset := bestCNFItemRes.rangeResult.Ranges.Subset(d.sctx.TypeCtx, res.Ranges)
pointRangeIsSubset := res.Ranges.Subset(d.sctx.TypeCtx, bestCNFItemRes.rangeResult.Ranges)
Expand Down

0 comments on commit 9c7f0c4

Please sign in to comment.