-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Background
In src/lib.rs, between_excludes and in_list_excludes return false immediately for negated forms:
// NOT BETWEEN is complex, be conservative
if between.negated { return false; }
// NOT IN is complex, be conservative
if in_list.negated { return false; }The current conservative behavior (never prune) is always safe. These are opportunities to prune more aggressively.
NOT BETWEEN
NOT BETWEEN low AND high is equivalent to col < low OR col > high.
A partition [min, max] can be excluded if it falls entirely within [low, high] — i.e., min >= low AND max <= high. In that case ALL rows satisfy col BETWEEN low AND high, so NONE satisfy NOT BETWEEN.
NOT IN
A simpler conservative improvement: if the partition has a single point (min == max) and that exact value appears in the NOT IN list, the partition can be pruned.
Notes
- These are enhancements and are not critical for correctness — the current behavior is always safe.
- Implement after the
Expr::Notbug is confirmed fixed and covered by tests (see issue about IN-list and NOT filter test coverage).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request