Skip to content

MOD-19331 perf(numeric): let the child filter drive batch materialization - #10876

Closed
ThierryBerger wants to merge 7 commits into
thierry-14948-merge-runsfrom
thierry-14948-child-driven
Closed

ThierryBerger wants to merge 7 commits into
thierry-14948-merge-runsfrom
thierry-14948-child-driven

Conversation

@ThierryBerger

@ThierryBerger ThierryBerger commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.

@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.59690% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.52%. Comparing base (4375f45) to head (0db2d72).

Files with missing lines Patch % Lines
...arch_rs/numeric_score_source/src/range_iterator.rs 82.35% 3 Missing and 9 partials ⚠️
src/redisearch_rs/top_k/src/iterator.rs 85.00% 0 Missing and 3 partials ⚠️
...c/redisearch_rs/numeric_score_source/src/source.rs 97.14% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           thierry-14948-merge-runs   #10876      +/-   ##
============================================================
+ Coverage                     80.81%   83.52%   +2.70%     
============================================================
  Files                           668      668              
  Lines                         86276    86374      +98     
  Branches                      40468    40566      +98     
============================================================
+ Hits                          69722    72141    +2419     
+ Misses                        16183    13849    -2334     
- Partials                        371      384      +13     
Flag Coverage Δ
flow 84.58% <ø> (+5.96%) ⬆️
unit 58.87% <87.59%> (+0.03%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ThierryBerger
ThierryBerger force-pushed the thierry-14948-child-driven branch from 9abf76d to cba3293 Compare September 22, 2026 06:59
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-merge-runs branch from 3dae0df to 88dec0c Compare September 22, 2026 06:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cba3293c7b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ThierryBerger
ThierryBerger force-pushed the thierry-14948-merge-runs branch from 88dec0c to 9464e13 Compare September 22, 2026 08:47
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-child-driven branch 2 times, most recently from 4de7716 to ea2f71c Compare September 23, 2026 08:31
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-merge-runs branch from 9464e13 to 20d722b Compare September 23, 2026 08:31
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-child-driven branch from ea2f71c to 39a2a7c Compare September 24, 2026 13:56
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-merge-runs branch 2 times, most recently from 023db8a to 998aa84 Compare September 25, 2026 07:08
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-child-driven branch 3 times, most recently from 2013887 to c61fbb9 Compare September 28, 2026 08:00
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-merge-runs branch from be68c50 to 42d7153 Compare September 28, 2026 08:00
@ThierryBerger
ThierryBerger force-pushed the thierry-14948-child-driven branch from c61fbb9 to bd64749 Compare September 28, 2026 08:16
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from bd64749 to 0dfca4d Compare September 28, 2026 12:32
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from 0dfca4d to e8a0917 Compare September 29, 2026 07:37
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch 2 times, most recently from 0301ff4 to 9cee5c5 Compare October 1, 2026 07:26
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-merge-runs branch 2 times, most recently from 2272308 to ef9c20c Compare October 5, 2026 09:38
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from 9cee5c5 to 7f5d0fc Compare October 5, 2026 09:38
ThierryBerger and others added 4 commits October 5, 2026 13:06
…rtly admits

A range that passes the filter only in part may yield none of its
documents, and a single-value range never splits, so reserving its full
num_docs could allocate ~16 B per doc for an empty batch. Capping such a
range at MAXIMUM_RANGE_SIZE keeps the reservation unchanged for every
leaf the tree can split, so bounded-filter batches still fill without
reallocating.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every group queried the whole field, so no range ever passed the filter
only in part. The bounded group queries the middle of the field and a
single-value range the filter excludes; the C shim now takes the filter
bounds so both sides run the same query.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from 7f5d0fc to d2ab63d Compare October 5, 2026 11:06
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-merge-runs branch from ef9c20c to 7bf46ef Compare October 5, 2026 11:06
@JonasKruckenberg JonasKruckenberg changed the title perf(numeric): let the child filter drive batch materialization MOD-19331 perf(numeric): let the child filter drive batch materialization Oct 5, 2026
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from d2ab63d to af1eafa Compare October 5, 2026 11:47
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-merge-runs branch from 7bf46ef to 7f505e5 Compare October 5, 2026 11:47
ThierryBerger and others added 3 commits October 5, 2026 14:01
On a multivalue field a range wholly inside the filter can still yield
nothing: the docs it holds may all have been emitted by an earlier
batch. Its num_docs is an upper bound there, so cap it at
MAXIMUM_RANGE_SIZE like a partly admitted range, keeping the exact
reservation for single-valued fields only.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ng it

After a match any later doc id will do, so a sequential read replaces the
skip_to, which an expensive child such as a union pays a search for.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-child-driven branch from af1eafa to 0db2d72 Compare October 5, 2026 12:02
@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-merge-runs branch from 7f505e5 to 4375f45 Compare October 5, 2026 12:02
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@JonasKruckenberg
JonasKruckenberg force-pushed the thierry-14948-merge-runs branch from 4375f45 to 00de96c Compare October 6, 2026 10:54
@JonasKruckenberg
JonasKruckenberg deleted the thierry-14948-child-driven branch October 7, 2026 08:09
@JonasKruckenberg
JonasKruckenberg removed this pull request from stack #11639 October 7, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants