Commit 7ceb086
[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 28067c6 commit 7ceb086
3 files changed
Lines changed: 23 additions & 3 deletions
File tree
- be/src/storage_primitive
- test/sql/test_inverted_index
- R
- T
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
394 | 396 | | |
395 | | - | |
396 | | - | |
| 397 | + | |
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
781 | 795 | | |
782 | 796 | | |
783 | 797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| |||
0 commit comments