Repository navigation
perf(query): implement index-guided lookups (issue #30) - #84
Merged
Merged
Conversation
Issue: PatternMatcher ignores indexes, always does full scan Changes: - Add lookup methods to Indexes: lookup_eavt_entity, lookup_eavt_entity_attr, lookup_aevt_attr, lookup_avet_attr_value, lookup_vaet_ref - Add match_patterns_with_hints to PatternMatcher that uses index hints - Add lookup_with_hint to use appropriate index based on IndexHint - Update executor to pass (Pattern, IndexHint) pairs instead of just patterns The matcher now uses index lookups when hints are available, falling back to full scan when index lookup is not applicable (e.g., variable bindings).
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (66.66%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
==========================================
- Coverage 91.72% 84.59% -7.14%
==========================================
Files 25 25
Lines 14494 4549 -9945
Branches 525 0 -525
==========================================
- Hits 13295 3848 -9447
+ Misses 1140 701 -439
+ Partials 59 0 -59
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
8000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lookup_eavt_entity,lookup_aevt_attr,lookup_avet_attr_value,lookup_vaet_refmatch_patterns_with_hintsto PatternMatcher that uses index hintslookup_with_hintto use appropriate index based on IndexHintThe matcher now uses index lookups when hints are available, falling back to full scan when index lookup is not applicable (e.g., variable bindings).
Note: This is Phase 6.2 implementation. The current index lookup returns all matching fact refs, but we still scan all facts in memory. Future work could use the fact refs to directly access packed pages.