Skip to content

fix: reject empty IN and NOT IN predicates - #579

Merged
lxy-9602 merged 1 commit into
apache:mainfrom
lszskye:fix-bloom-empty-in
Nov 19, 2026
Merged

lxy-9602 merged 1 commit into
apache:mainfrom
lszskye:fix-bloom-empty-in

Conversation

@lszskye

@lszskye lszskye commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Purpose

The default FileIndexReader::VisitIn() and VisitNotIn() implementations
return success with a null result when given an empty literal list. Bloom
index evaluation inherits these implementations and can dereference the
null result.

Reject empty IN and NOT IN lists with Status::Invalid during predicate
validation and when file index readers are called directly. Apply consistent
checks across reader implementations and correct the bitmap NOT IN error
message.

Tests

  • Verify that validation rejects empty IN and NOT IN lists, including
    predicates nested within AND and OR.
  • Verify that non-empty lists and IS NULL / IS NOT NULL remain valid.
  • Cover direct calls to the default, Bloom, bitmap, BSI, range bitmap, and
    empty index readers.
  • Cover Bloom indexes containing mixed values, only nulls, and no rows,
    as well as both bitmap index format versions.

API and Format

No API signature, storage format, or protocol changes.

Empty IN and NOT IN lists are now consistently rejected during validation
and direct file index evaluation.

Documentation

Update predicate builder comments to describe empty-list rejection and
document that successful FileIndexReader visits return non-null results.

Generative AI tooling

Generated-by: OpenAI Codex (GPT-6)

@lxy-9602 lxy-9602 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lxy-9602
lxy-9602 merged commit e71199b into apache:main Nov 19, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants