BE-455: HashQL: Introduce evaluation orchestrator#8586
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8586 +/- ##
==========================================
+ Coverage 62.72% 63.08% +0.36%
==========================================
Files 1363 1383 +20
Lines 139062 143354 +4292
Branches 5818 5885 +67
==========================================
+ Hits 87225 90439 +3214
- Misses 50921 51957 +1036
- Partials 916 958 +42 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
95af2dc to
8045f18
Compare
|
Deployment failed with the following error: |
Dependency ReviewThe following issues were found:
VulnerabilitiesCargo.lock
License Issueslibs/@local/hashql/eval/Cargo.toml
OpenSSF ScorecardScorecard details
Scanned Files
|
8045f18 to
2c34639
Compare
1024ba5 to
1e966bd
Compare
27b21ef to
a412453
Compare
feat: make Int size aware feat: postgres serialization feat: checkpoint feat: checkpoint feat: checkpoint feat: errors feat: psql codec feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: move bridge -> orchestrator feat: move bridge -> orchestrator feat: organize the runtime a bit more feat: organize the runtime a bit more feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: organize the runtime a bit more feat: finish orchestrator first version feat: finish orchestrator first version feat: feat: move out suspension requests to own module chore: clippy feat: split out into more manageable functions feat: split out into more manageable functions chore: orchestrator docs feat: organize the runtime a bit more feat: test orchestrator feat: better symbol repr feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: test orchestrator feat: pipeline feat: bless snapshots chore: tests chore: masking chore: tests fix: SSA repair chiore: ssa repair snapshots feat: orchestrator test harness chore: remove spec fix: library features chore: update snapshots chore: update docs
a412453 to
f722e52
Compare
f722e52 to
83bf74a
Compare
dae3f47 to
0a89a10
Compare
83bf74a to
e30f552
Compare
0a89a10 to
b2d61fe
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b4765d0. Configure here.


🌟 What is the purpose of this PR?
Introduce the evaluation orchestrator: the runtime layer that drives HashQL query execution across the interpreter and PostgreSQL, handling suspension fulfillment, row hydration, continuation decoding, and result assembly.
When the MIR interpreter suspends on a
GraphRead, it yields a description of the data it needs but can't fetch itself. The orchestrator takes that suspension, looks up the pre-compiled SQL, encodes parameters, executes the query, hydrates each result row into a typedValuetree, runs any client-side filter chains (which may themselves interleave interpreter and postgres execution), decodes continuation state for multi-island queries, and packages the result into aContinuationthat resumes the interpreter.🔍 What does this change?
Orchestrator (
eval/src/orchestrator/)mod.rs: top-levelOrchestratorthat owns the database client and query registry. Providesrun_infor full query execution andfulfill_infor resolving a single suspension.request/graph_read.rs: per-suspension handler that drives the query-execute-hydrate-filter-collect loop forGraphReadsuspensions.partial.rs: three-state hydration (Skipped/Null/Value) that assembles flat result columns into nested vertex value trees matching the HashQL type hierarchy.codec/decode: deserializes JSON column values fromtokio_postgresrows into typedValues, guided by the HashQL type system.codec/encode: serializes runtimeValues and query parameters into formstokio_postgrescan send to the database.postgres.rs: continuation state for multi-island execution. When a compiled query returns continuation columns (target block, locals, serialized values), this hydrates and validates them, then flushes the decoded state into the interpreter's callstack.events.rs: opt-in event tracing with zero-cost()sink.AppendEventLogcollects events into aVecfor test assertions.tail.rs: result accumulation strategies (currentlyCollectinto aList).error.rs: structured bridge errors. All variants useSeverity::Bugbecause if the bridge fails, the compiler or runtime produced something invalid.seed.rs,inputs.rs,directives.rs: test infrastructure for constructing orchestrator inputs from J-Expr test files.Postgres extensions (
eval/src/postgres/)types.rs: recursive type-tree navigation for resolving struct fields to concrete types.continuation.rs: naming conventions and expression helpers for continuation LATERAL subqueries.parameters.rs: new parameter kinds for temporal axes and continuation locals.traverse.rs: mapping fromEntityPathto physical PostgreSQL columns (temporal ranges decomposed to JSONB intervals, edition/identity columns).filter/: client-side filter chain changes for multi-island filter bodies.Compilation pipeline (
compiletest/src/pipeline.rs)Pipelinestruct that drives the full J-Expr to prepared-SQL compilation sequence with staged access to intermediate results. Used by the orchestrator test harness and compiletest.Test harness (
eval/tests/orchestrator/).jsoncUI test files and programmatic Rust builders.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
GraphReadtail strategies beyondCollect(e.g. streaming, pagination).🛡 What tests cover this?
eval/tests/orchestrator/): end-to-end tests against a real PostgreSQL instance covering simple reads, filtered reads, diamond CFG filters, link data, metadata fields, let bindings, sequential filters, and entity type projections.orchestrator/codec/decode/tests.rs,codec/encode/tests.rs): round-trip encoding/decoding of values, parameters, and edge cases.eval/tests/ui/postgres/): snapshot tests for SQL output.❓ How to test this?
cargo nextest run --package hashql-evalcargo test --package hashql-eval --doc