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 @@
## 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:
|
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
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.
|
|
||
| # Also update the timestamp of whatever profile_rc we have. | ||
| # This makes sure that we know we are up to date. | ||
| touch -r "/Users/bmahmoud/projects/hash/hash/.envrc" "/Users/bmahmoud/projects/hash/hash/.direnv"/*.rc |
There was a problem hiding this comment.
Local development .direnv files accidentally committed
High Severity
The entire .direnv/ directory has been committed, containing machine-specific nix-direnv configuration files. These include hardcoded local paths (/Users/bmahmoud/projects/hash/hash), nix store references, and environment variable exports tied to a specific developer's machine. The .gitignore has no entry for .direnv, so this will persist and potentially cause conflicts for other developers. These files are auto-generated by direnv and should never be version-controlled.
Additional Locations (1)
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