Repository navigation
feat(query): Filter/Bind, pseudo-attributes, cross-kind constants on the engine (#544, PR 2 of 3) - #590
Merged
Conversation
…the engine (#544) The engine now runs expression clauses and per-fact pseudo-attribute patterns after its scan pattern, in optimizer::plan order, and keyword, UUID and float value constants, reading only the AVET ranges they can match (attribute_kind_prefix from #518's branch). :db/valid-at stays on the executor (a join, #545). INT-026 and QRY-007 are raised before the engine runs, by the executor's own checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
Its && asserts left failure branches the coverage gate counts: keys.rs branches 76.4% < 80% floor; now 81.7%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
8 tasks
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.
Part of #544 (streaming engine 2/9, #473). PR 2 of 3: plan steps 7–9 in
docs/superpowers/plans/2026-10-14-544-operator-core.md.What runs on the engine now
Filter/Bind(src/query/engine/filter.rs): expression clauses after the scan pattern, inoptimizer::planorder. A binding expression overwrites a bound variable at the same point the executor does ([(+ ?v 1) ?v]is accepted by the parser); a failing expression drops the row. Registered predicates run through the sameeval_expr.:db/valid-from,:db/valid-to,:db/tx-count,:db/tx-idon the scan pattern's entity become integer columns the scan fills (tx-idonly when asked for; committed rows look it up through the newKeySource::tx_id_of).f64::EPSILON.ValueKind/attribute_kind_prefixcome from perf: attribute+value patterns scan the whole attribute; AVET index is never read #518's parked branch.INT-026andQRY-007are raised before the engine runs, by the executor's own checks (check_clauses); the executor path keeps its error order.Stays on the executor (deviations, recorded in the plan)
:db/valid-at: the executor binds it by scanning every fact of the entity (a bag row per fact), i.e. a join (streaming engine 3/9: IndexNestedLoopJoin and HashJoin (#473) #545).attribute_string_prefixnot ported: nothing would call it.Tests
query::engine::tests: new shapes over the random history (keyword/UUID/float constants against keywords, refs and UUID-named keywords; filters, binds, rebinding, failing expressions; every pseudo-attribute, constants, repeated variables, pseudo + expression), all compared with the executor by the oracle at several:as-of/valid times, in memory, across checkpoints and after reopen; the perf: attribute+value patterns scan the whole attribute; AVET index is never read #518 branch's cross-kind test ported as an engine test with expected entities; routing (what stays on the executor) and error order (INT-026, QRY-007); a registered predicate.tx-idlookup, UUID-named keyword matching, misaligned bind columns — each fails the suite.cargo testandcargo test --features test-oracle: 1471 passed, 10 ignored. Engine tests also pass with--features wasm(no join reordering). Clippy clean (native all-features,wasm32-unknown-unknown --features browser,wasm32-wasip1).No public API change, no new error code: no binding cascade.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR