8000 fix(query): pass real indexes to optimizer for index hints (issue #30) by adityamukho · Pull Request #69 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(query): pass real indexes to optimizer for index hints (issue #30) - #69

Merged
adityamukho merged 1 commit into
mainfrom
fix/issue-30-pattern-matcher-indexes
Apr 3, 2026
Merged

adityamukho merged 1 commit into
mainfrom
fix/issue-30-pattern-matcher-indexes

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Summary

  • Add indexes field to DatalogExecutor, populated from storage.pending_indexes_snapshot() on creation
  • Pass real indexes to optimizer::plan() instead of empty Indexes::new()
  • Add indexes field to PatternMatcher for future index-guided lookups (Phase 6.2)

This fixes the issue where the optimizer generated index hints but they were being ignored because the matcher always received empty indexes.

Note: The actual index-guided lookup implementation (using the indexes to do selective scans instead of full scans) is Phase 6.2 work. This change ensures index hints are no longer ignored.

Issue: PatternMatcher ignores indexes, always does full scan
- Add indexes field to DatalogExecutor, populate from storage on creation
- Pass real indexes to optimizer::plan() instead of empty Indexes::new()
- Add indexes field to PatternMatcher for future index-guided lookups
- Note: actual index-guided lookup implementation is Phase 6.2 work

This fixes the issue where optimizer-generated index hints were being ignored.
@adityamukho
adityamukho merged commit 6aa67f9 into main Apr 3, 2026
10 checks passed
@adityamukho
adityamukho deleted the fix/issue-30-pattern-matcher-indexes branch April 3, 2026 03:28
@codecov
codecov Bot commented Apr 3, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.50%. Comparing base (b430885) to head (1cf0eff).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
+ Coverage   84.34%   84.50%   +0.16%     
==========================================
  Files          25       25              
  Lines        4394     4402       +8     
==========================================
+ Hits         3706     3720      +14     
+ Misses        688      682       -6     
Files with missing lines Coverage Δ
src/query/datalog/executor.rs 93.30% <100.00%> (+0.04%) ⬆️
src/query/datalog/matcher.rs 89.69% <100.00%> (+0.21%) ⬆️

... and 1 file with indirect coverage changes

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

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.

1 participant

0