Skip to content

Accept any negative cardinality as unknown in BloomIndexType#18232

Merged
Jackie-Jiang merged 1 commit intoapache:masterfrom
Jackie-Jiang:bloom_index_more_robust
Apr 17, 2026
Merged

Accept any negative cardinality as unknown in BloomIndexType#18232
Jackie-Jiang merged 1 commit intoapache:masterfrom
Jackie-Jiang:bloom_index_more_robust

Conversation

@Jackie-Jiang
Copy link
Copy Markdown
Contributor

@Jackie-Jiang Jackie-Jiang commented Apr 16, 2026

Updates BloomIndexType to use the relaxed check (cardinality < 0) instead of comparing against Constants.UNKNOWN_CARDINALITY exactly, so bloom index creation is robust regardless of the sentinel value stored in segment metadata.

Also adds a TODO to consider changing UNKNOWN_CARDINALITY from Integer.MIN_VALUE to -1 after the 1.6.0 release for better readability in stored metadata.

Update BloomIndexType to use the relaxed check (`cardinality < 0`)
instead of comparing against `Constants.UNKNOWN_CARDINALITY` exactly,
so bloom index creation is robust regardless of the sentinel value
stored in segment metadata.

Also add a TODO to consider changing `UNKNOWN_CARDINALITY` from
`Integer.MIN_VALUE` to `-1` after the 1.6.0 release for better
readability in stored metadata.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jackie-Jiang Jackie-Jiang force-pushed the bloom_index_more_robust branch from 2223893 to 5e37938 Compare April 16, 2026 02:27
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.33%. Comparing base (87e09fd) to head (5e37938).

Files with missing lines Patch % Lines
...ment/local/segment/index/bloom/BloomIndexType.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18232      +/-   ##
============================================
- Coverage     63.36%   63.33%   -0.03%     
  Complexity     1627     1627              
============================================
  Files          3243     3243              
  Lines        197038   197038              
  Branches      30466    30466              
============================================
- Hits         124845   124802      -43     
- Misses        62195    62238      +43     
  Partials       9998     9998              
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.31% <0.00%> (+<0.01%) ⬆️
java-21 63.31% <0.00%> (-0.02%) ⬇️
temurin 63.33% <0.00%> (-0.03%) ⬇️
unittests 63.33% <0.00%> (-0.03%) ⬇️
unittests1 55.30% <0.00%> (-0.02%) ⬇️
unittests2 34.93% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Jackie-Jiang Jackie-Jiang added the minor Small or trivial change label Apr 17, 2026
@Jackie-Jiang Jackie-Jiang merged commit 3ab2dca into apache:master Apr 17, 2026
45 of 48 checks passed
@Jackie-Jiang Jackie-Jiang deleted the bloom_index_more_robust branch April 17, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Small or trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants