BE-537: Remove old filter API backend and wire up HashQL in the API#8827
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryHigh Risk Overview The graph server now builds a shared Entity query/subgraph/count handlers are moved under The large Reviewed by Cursor Bugbot for commit cd47de2. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd47de2. Configure here.
| let thread_count = | ||
| exec_pool_size.unwrap_or_else(|| available_parallelism().map_or(4, NonZero::get)); | ||
|
|
||
| let pool = LocalPoolHandle::new(thread_count); |
There was a problem hiding this comment.
Zero exec pool panics
High Severity
PoolSize treats 0 as a valid compiler_exec_pool_size, and CompilerContext::new passes it straight to LocalPoolHandle::new, which panics when the pool size is less than one. A HASH_GRAPH_COMPILER_EXEC_POOL_SIZE=0 (or CLI 0) prevents the graph server from starting.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cd47de2. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## bm/be-513-hashql-size-estimation-aggregate-cardinality-is-wrong-for #8827 +/- ##
=======================================================================================================
+ Coverage 59.15% 59.50% +0.34%
=======================================================================================================
Files 1343 1338 -5
Lines 129988 130596 +608
Branches 5873 5871 -2
=======================================================================================================
+ Hits 76894 77706 +812
+ Misses 52188 51985 -203
+ Partials 906 905 -1 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR continues the migration away from the legacy “filter API” backend by wiring up HashQL end-to-end: parsing J-Expr, compiling through MIR, generating PostgreSQL queries, and executing them via the orchestrator, with updated diagnostics, allocators, and test coverage across the HashQL toolchain and graph API.
Changes:
- Adds a new REST
/hashqlendpoint inhash-graph-apibacked by a shared compiler/execution context and a pinned local execution pool for!Sendfutures. - Refactors HashQL eval/orchestrator and MIR passes (lowering + placement) and updates diagnostics/span infrastructure to support the new pipeline.
- Updates tests/benches and removes legacy eval graph-read entity compiletest coverage in favor of new MIR interpret/reify UI tests.
Reviewed changes
Copilot reviewed 226 out of 227 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/graph/http/test.sh | Runs new HashQL httpyac suite |
| tests/graph/benches/manual_queries/entity_queries/mod.rs | Updates entity query request API usage |
| libs/@local/hashql/syntax-jexpr/src/test.rs | Adapts diagnostic rendering generics |
| libs/@local/hashql/syntax-jexpr/src/parser/string/error.rs | Updates diagnostics severity typing |
| libs/@local/hashql/syntax-jexpr/src/parser/state.rs | Adds inline hints for conversions |
| libs/@local/hashql/syntax-jexpr/src/parser/object/visit.rs | Updates Diagnostic type parameters |
| libs/@local/hashql/syntax-jexpr/src/parser/error.rs | Updates parser diagnostic severity plumbing |
| libs/@local/hashql/syntax-jexpr/src/parser/complex/mod.rs | Updates Diagnostic type parameters |
| libs/@local/hashql/syntax-jexpr/src/parser/array/visit.rs | Updates Diagnostic type parameters |
| libs/@local/hashql/syntax-jexpr/src/parser/array/error.rs | Updates array diagnostics + inlines |
| libs/@local/hashql/syntax-jexpr/src/lexer/syntax_kind_set.rs | Adds inline hints + default |
| libs/@local/hashql/syntax-jexpr/src/lexer/mod.rs | Renames/threads lexer diagnostic type |
| libs/@local/hashql/syntax-jexpr/src/lexer/error.rs | Updates lexer diagnostics severity typing |
| libs/@local/hashql/syntax-jexpr/src/error.rs | Generic severity for JExpr diagnostics |
| libs/@local/hashql/mir/tests/ui/reify/ctor-cached-closure.stdout | New regression output for ctor caching |
| libs/@local/hashql/mir/tests/ui/reify/ctor-cached-closure.jsonc | New regression input for ctor caching |
| libs/@local/hashql/mir/tests/ui/interpret/access-struct-through-opaque.stdout | New interpreter output for opaque delegation |
| libs/@local/hashql/mir/tests/ui/interpret/access-struct-through-opaque.jsonc | New interpreter input for opaque delegation |
| libs/@local/hashql/mir/tests/ui/interpret/.spec.toml | New UI suite spec for mir/interpret |
| libs/@local/hashql/mir/src/reify/transform.rs | Threads allocator params into Reifier impl |
| libs/@local/hashql/mir/src/reify/terminator.rs | Threads allocator params into Reifier impl |
| libs/@local/hashql/mir/src/reify/rvalue.rs | Fixes ctor caching to preserve calling convention |
| libs/@local/hashql/mir/src/reify/mod.rs | Adds scratch allocator + allocator generics |
| libs/@local/hashql/mir/src/reify/error.rs | Exposes reify diagnostics publicly |
| libs/@local/hashql/mir/src/reify/current.rs | Adds inline hints for ID conversions |
| libs/@local/hashql/mir/src/reify/atom.rs | Threads allocator params into Reifier impl |
| libs/@local/hashql/mir/src/pass/transform/ssa_repair/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/inst_simplify/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/forward_substitution.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/dse/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/copy_propagation/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/cfg_simplify/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/transform/canonicalization.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/mod.rs | Introduces lower and place pipeline APIs |
| libs/@local/hashql/mir/src/pass/execution/traversal/mod.rs | Adds inline hint for set conversions |
| libs/@local/hashql/mir/src/pass/execution/terminator_placement/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/execution/splitting/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/pass/execution/mod.rs | Adds Debug impl for residual output |
| libs/@local/hashql/mir/src/pass/execution/island/mod.rs | Adds inline hints + Default |
| libs/@local/hashql/mir/src/pass/execution/island/graph/mod.rs | Adds Debug impl for IslandGraph |
| libs/@local/hashql/mir/src/pass/execution/cost/mod.rs | Adds inline hint for conversions |
| libs/@local/hashql/mir/src/pass/analysis/data_dependency/mod.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/interpret/value/str.rs | Adds detach/clone support + docs |
| libs/@local/hashql/mir/src/interpret/value/ptr.rs | Adds docs + inline hints |
| libs/@local/hashql/mir/src/interpret/value/num.rs | Adds docs + inline hints |
| libs/@local/hashql/mir/src/interpret/tests.rs | Adds safety comments around unchecked struct |
| libs/@local/hashql/mir/src/interpret/suspension/temporal.rs | Adds inline hints for conversions |
| libs/@local/hashql/mir/src/interpret/runtime.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/interpret/locals.rs | Clarifies unsafe struct construction invariants |
| libs/@local/hashql/mir/src/interpret/inputs.rs | Adds Default inline hint |
| libs/@local/hashql/mir/src/error.rs | Adds Reify to MIR diagnostic hierarchy |
| libs/@local/hashql/mir/src/body/operand.rs | Adds inline hints for conversions |
| libs/@local/hashql/hir/src/map.rs | Adds Default inline hint |
| libs/@local/hashql/hir/src/lower/normalization.rs | Adds Default inline hint |
| libs/@local/hashql/hir/src/context.rs | Adds Default inline hints |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-type-constructor.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-nested-graph-read.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/unsupported-closure.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/type-assertion-in-comparison.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/top-type-assertion.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/top-level-variable.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/scalar-property-filter.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-let-bindings.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/nested-binary-operation.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-or-and.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/logical-and-or.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/let-propagation.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/let-expression.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-vertex-query.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-index-access-error.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/invalid-field-access-error.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-parameter.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-index-access.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/input-field-access.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/if-filter-expr.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-tuple.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-struct-entry.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-list.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-value.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-in-dict-key.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-tuple.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/field-access-struct.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/equality-comparison.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/constructor-call-none.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/computed-path-indexing-error.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/complex-object-error.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.stderr | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/call-identity.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/boolean-literal.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-or.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.stdout | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/arithmetic-comparisons-and.jsonc | Removes legacy eval/graph UI coverage |
| libs/@local/hashql/eval/tests/ui/graph/read/entity/.spec.toml | Removes legacy suite spec |
| libs/@local/hashql/eval/tests/orchestrator/output.rs | Generalizes render over allocator |
| libs/@local/hashql/eval/tests/orchestrator/main.rs | Adjusts lowering/execution API usage |
| libs/@local/hashql/eval/tests/orchestrator/execution.rs | Splits codegen vs execution contexts |
| libs/@local/hashql/eval/src/postgres/projections.rs | Adds inline hint |
| libs/@local/hashql/eval/src/postgres/parameters.rs | Adds inline hint |
| libs/@local/hashql/eval/src/postgres/mod.rs | Renames EvalContext to CodeGenerationContext |
| libs/@local/hashql/eval/src/postgres/filter/tests.rs | Updates filter tests to new contexts/interning |
| libs/@local/hashql/eval/src/postgres/filter/mod.rs | Updates compiler context type |
| libs/@local/hashql/eval/src/orchestrator/partial.rs | Uses eval Interner symbols for structs |
| libs/@local/hashql/eval/src/orchestrator/mod.rs | New orchestrator diagnostics + run_in plumbing |
| libs/@local/hashql/eval/src/orchestrator/events.rs | Adds Default inline hint |
| libs/@local/hashql/eval/src/orchestrator/codec/decode/mod.rs | Uses eval Interner type |
| libs/@local/hashql/eval/src/lib.rs | Removes old graph feature, adds intern module |
| libs/@local/hashql/eval/src/intern.rs | New eval interner preserving identity |
| libs/@local/hashql/eval/src/graph/read/sink.rs | Removes old graph-read compiler code |
| libs/@local/hashql/eval/src/graph/read/convert.rs | Removes old graph-read conversion code |
| libs/@local/hashql/eval/src/graph/mod.rs | Removes legacy graph module |
| libs/@local/hashql/eval/src/graph/error.rs | Removes legacy graph diagnostics |
| libs/@local/hashql/eval/src/error.rs | Adds orchestrator diagnostics category |
| libs/@local/hashql/eval/src/context.rs | Splits codegen vs execution context types |
| libs/@local/hashql/eval/Cargo.toml | Removes graph feature + dependency reshuffle |
| libs/@local/hashql/diagnostics/src/source/span.rs | Adds inline hints |
| libs/@local/hashql/diagnostics/src/lib.rs | Re-exports IntoStatus |
| libs/@local/hashql/diagnostics/src/issues.rs | Adds span mapping + serde impls |
| libs/@local/hashql/core/src/value/opaque.rs | Removes legacy core Opaque value type |
| libs/@local/hashql/core/src/type/visit.rs | Adds Default inline hint |
| libs/@local/hashql/core/src/type/recursion.rs | Adds Default inline hint |
| libs/@local/hashql/core/src/type/inference/solver/tests.rs | Adds new regression test for opaque variance |
| libs/@local/hashql/core/src/type/inference/solver/mod.rs | Adds Default inline hint |
| libs/@local/hashql/core/src/type/inference/solver/graph.rs | Adds Default inline hint |
| libs/@local/hashql/core/src/span/table.rs | Changes ancestors API to iterator + LocalSpanId |
| libs/@local/hashql/core/src/span/mod.rs | Adds LocalSpanId newtype + serde safety attrs |
| libs/@local/hashql/core/src/pretty/formatter.rs | Adds Default inline hint |
| libs/@local/hashql/core/src/module/namespace.rs | Adds inline hint |
| libs/@local/hashql/core/src/lib.rs | Feature flag adjustments |
| libs/@local/hashql/core/src/id/bit_vec/mod.rs | Adds inline hints for domain_size |
| libs/@local/hashql/core/src/heap/scratch.rs | Inline/must_use ordering + Default |
| libs/@local/hashql/core/src/heap/mod.rs | Exposes HeapPool + Default |
| libs/@local/hashql/core/src/graph/linked.rs | Adds Debug impl + inline accessors |
| libs/@local/hashql/core/src/graph/algorithms/dominators/frontier.rs | Adds inline hint |
| libs/@local/hashql/core/src/collections/pool.rs | Adds inline hint |
| libs/@local/hashql/core/Cargo.toml | Removes rpds from core deps |
| libs/@local/hashql/compiletest/src/suite/mod.rs | Removes eval graph suite, adds mir/interpret suite |
| libs/@local/hashql/compiletest/src/suite/mir_reify.rs | Threads Scratch through mir reify |
| libs/@local/hashql/compiletest/src/suite/mir_pass_transform_pre_inline.rs | Adjusts mir_reify return tuple |
| libs/@local/hashql/compiletest/src/suite/mir_pass_transform_cfg_simplify.rs | Reuses Scratch from mir_reify |
| libs/@local/hashql/compiletest/src/suite/mir_pass_analysis_data_dependency.rs | Adjusts mir_reify return tuple |
| libs/@local/hashql/compiletest/src/suite/mir_interpret.rs | New suite executing MIR interpreter |
| libs/@local/hashql/compiletest/src/suite/eval_postgres.rs | Updates to CodeGenerationContext + interner |
| libs/@local/hashql/compiletest/src/suite/eval_graph_read_entity.rs | Removes legacy eval graph suite |
| libs/@local/hashql/compiletest/src/pipeline.rs | Uses new MIR pass::lower/place APIs |
| libs/@local/hashql/compiletest/Cargo.toml | Drops hashql-eval graph feature flag |
| libs/@local/hashql/ast/src/lowering/sanitizer.rs | Adds Default inline hint |
| libs/@local/hashql/ast/src/lowering/node_renumberer.rs | Adds Default inline hint |
| libs/@local/graph/postgres-store/src/store/postgres/mod.rs | Implements AsRef for PostgresStore |
| libs/@local/graph/api/src/rest/mod.rs | Wires HashQL routes + compiler/postgres deps + Json-Compat header |
| libs/@local/graph/api/src/rest/hashql/mod.rs | New HashQL REST endpoint + pinned execution |
| libs/@local/graph/api/src/rest/hashql/compile.rs | New HashQL compilation pipeline orchestration |
| libs/@local/graph/api/src/rest/hashql/value.rs | New owned JSON-friendly value representation |
| libs/@local/graph/api/src/rest/hashql/error.rs | New HashQL diagnostics → HTTP responses |
| libs/@local/graph/api/src/rest/entity/query/filter.rs | Empty filter module placeholder |
| libs/@local/graph/api/src/lib.rs | Enables allocator_api feature |
| libs/@local/graph/api/Cargo.toml | Adds hashql-mir dep; removes hashql-eval graph feature |
| Cargo.toml | Adds workspace deps for sqruff-lib crates |
| Cargo.lock | Updates deps for removed/added crates |
| apps/hash-graph/src/subcommand/server.rs | Adds compiler pool configuration + wiring |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| result.unwrap_or_else(|_| { | ||
| Json(serde_json::json!({"fatal": "internal error: query execution failed"})) | ||
| .into_response() | ||
| .into() | ||
| }) |
| /// A pool size that can be either a concrete count or unbounded. | ||
| /// | ||
| /// Parses positive integers as a bounded size and `-1` as unbounded. | ||
| #[derive(Debug, Copy, Clone)] |
| List(Vec<Self>), | ||
| /// An ordered dictionary. | ||
| Dict(BTreeMap<Self, Self>), | ||
| } | ||
|
|
||
| impl<'heap, A: Allocator + Clone> From<Value<'heap, A>> for OwnedValue { | ||
| fn from(value: Value<'heap, A>) -> Self { |
| OwnedValue::List(owned_values) => serializer.collect_seq(owned_values.iter().map(Self)), | ||
| OwnedValue::Dict(btree_map) => serializer.collect_map( | ||
| btree_map | ||
| .iter() | ||
| .map(|(key, value)| (Self(key), Self(value))), | ||
| ), |
| // Lower the AST | ||
| let Success { | ||
| value: types, | ||
| advisories, | ||
| } = hashql_ast::lowering::lower(heap.intern_symbol("main"), &mut ast, &env, &modules) | ||
| .map_category(|category| { | ||
| HashQlDiagnosticCategory::Ast(AstDiagnosticCategory::Lowering(category)) | ||
| }) | ||
| .with_diagnostics(advisories)?; |
| @@ -0,0 +1 @@ | |||
|
|
|||
Merging this PR will improve performance by 38.67%
Performance Changes
Tip Curious why this is faster? Comment Comparing |
Benchmark results
|
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2002 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 1001 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 3314 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 1526 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 2078 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 1033 | Flame Graph |
policy_resolution_medium
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 102 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 51 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 269 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 107 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 133 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 63 | Flame Graph |
policy_resolution_none
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 2 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 8 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 3 | Flame Graph |
policy_resolution_small
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| resolve_policies_for_actor | user: empty, selectivity: high, policies: 52 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: empty, selectivity: medium, policies: 25 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: high, policies: 94 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: seeded, selectivity: medium, policies: 26 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: high, policies: 66 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: low, policies: 1 | Flame Graph | |
| resolve_policies_for_actor | user: system, selectivity: medium, policies: 29 | Flame Graph |
read_scaling_complete
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id;one_depth | 1 entities | Flame Graph | |
| entity_by_id;one_depth | 10 entities | Flame Graph | |
| entity_by_id;one_depth | 25 entities | Flame Graph | |
| entity_by_id;one_depth | 5 entities | Flame Graph | |
| entity_by_id;one_depth | 50 entities | Flame Graph | |
| entity_by_id;two_depth | 1 entities | Flame Graph | |
| entity_by_id;two_depth | 10 entities | Flame Graph | |
| entity_by_id;two_depth | 25 entities | Flame Graph | |
| entity_by_id;two_depth | 5 entities | Flame Graph | |
| entity_by_id;two_depth | 50 entities | Flame Graph | |
| entity_by_id;zero_depth | 1 entities | Flame Graph | |
| entity_by_id;zero_depth | 10 entities | Flame Graph | |
| entity_by_id;zero_depth | 25 entities | Flame Graph | |
| entity_by_id;zero_depth | 5 entities | Flame Graph | |
| entity_by_id;zero_depth | 50 entities | Flame Graph |
read_scaling_linkless
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | 1 entities | Flame Graph | |
| entity_by_id | 10 entities | Flame Graph | |
| entity_by_id | 100 entities | Flame Graph | |
| entity_by_id | 1000 entities | Flame Graph | |
| entity_by_id | 10000 entities | Flame Graph |
representative_read_entity
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1
|
Flame Graph | |
| entity_by_id | entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1
|
Flame Graph |
representative_read_entity_type
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| get_entity_type_by_id | Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba
|
Flame Graph |
representative_read_multiple_entities
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| entity_by_property | traversal_paths=0 | 0 | |
| entity_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| entity_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=0 | 0 | |
| link_by_source_by_property | traversal_paths=255 | 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true | |
| link_by_source_by_property | traversal_paths=2 | 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true |
scenarios
| Function | Value | Mean | Flame graphs |
|---|---|---|---|
| full_test | query-limited | Flame Graph | |
| full_test | query-unlimited | Flame Graph | |
| linked_queries | query-limited | Flame Graph | |
| linked_queries | query-unlimited | Flame Graph |



🌟 What is the purpose of this PR?
TODO: this PR is huge, and will be split into multiple smaller PRs (13 planned)
🔗 Related links
🚫 Blocked by
🔍 What does this change?
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:
turbo.json's have been updated to reflect this🐾 Next steps
🛡 What tests cover this?
❓ How to test this?
📹 Demo