BE-455: HashQL: Introduce evaluation orchestrator#8586
Open
indietyp wants to merge 4 commits intobm/be-523-hashql-suspendable-interpreter-with-structured-values-andfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
This was referenced Mar 26, 2026
Merged
Member
Author
This was referenced Mar 26, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## bm/be-523-hashql-suspendable-interpreter-with-structured-values-and #8586 +/- ##
=======================================================================================================
- Coverage 71.84% 63.46% -8.39%
=======================================================================================================
Files 899 1270 +371
Lines 84167 136782 +52615
Branches 4581 5476 +895
=======================================================================================================
+ Hits 60470 86809 +26339
- Misses 23093 49065 +25972
- Partials 604 908 +304 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:
|
3 tasks
3 tasks
95af2dc to
8045f18
Compare
|
Deployment failed with the following error: |
Contributor
Dependency ReviewThe following issues were found:
VulnerabilitiesCargo.lock
License Issueslibs/@local/hashql/eval/Cargo.toml
OpenSSF ScorecardScorecard details
Scanned Files
|
3 tasks
3 tasks
8045f18 to
2c34639
Compare
1024ba5 to
1e966bd
Compare
3 tasks
27b21ef to
a412453
Compare
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 aba337d. Configure here.
This was referenced May 4, 2026
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.


🌟 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