Commit c006d54
[BugFix] Keep non-null rows for negated empty-literal MATCH in inverted-index seek
seek_inverted_index cleared the row bitmap whenever the match literal was empty
(read_inverted_index returned nullopt), regardless of negation. That dropped
every row for NOT (col MATCH ''), even though MATCH '' matches nothing and its
negation is TRUE for all non-null rows. This surfaced once the OR-MATCH fallback
started reusing seek_inverted_index.
Substitute an empty posting set for the nullopt case and reuse the shared
with_not / intersect path, so col MATCH '' keeps no rows while NOT (col MATCH '')
keeps every non-null row (only NULLs stay out). Fixes the same latent bug on the
AND filtering path. Add SQL regression for both the AND and OR-MATCH fallback
paths.
Signed-off-by: eason <1569163626@qq.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5d475ea commit c006d54
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
396 | | - | |
| 395 | + | |
397 | 396 | | |
398 | 397 | | |
399 | 398 | | |
| |||
0 commit comments