Skip to content

BE-421: HashQL: Add equality safety checks for Postgres statement placement#8480

Merged
indietyp merged 5 commits into
mainfrom
bm/be-421-hashql-only-allow-unambiguous-comparisons-inside-postgresql
Feb 26, 2026
Merged

BE-421: HashQL: Add equality safety checks for Postgres statement placement#8480
indietyp merged 5 commits into
mainfrom
bm/be-421-hashql-only-allow-unambiguous-comparisons-inside-postgresql

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

This PR adds equality safety checks to the Postgres statement placement pass in the HashQL MIR compiler. The changes prevent equality and inequality comparisons from being executed in Postgres when the operand types could produce identical jsonb representations while being semantically distinct in the interpreter.

🔍 What does this change?

  • Adds a debug_panic! macro to the hashql-core library for debug-only panics
  • Implements is_equality_safe and is_equality_safe_operand functions that check for representational collisions between types in jsonb serialization
  • Adds a peel function that strips type wrappers (Opaque, Apply, Generic) to reach underlying concrete types
  • Modifies the Postgres statement placement pass to reject == and != operations when operands could have representational collisions (e.g., Dict<String, _> vs struct, List<_> vs tuple)
  • Adds comprehensive test coverage for equality safety checks including edge cases with unions, intersections, unknown types, and nested structures
  • Updates import statements across multiple files to include newly required types and functions

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • New unit tests for is_equality_safe function covering various type combinations
  • Integration tests for the Postgres statement placement pass with equality operations
  • Test cases for representational collisions between Dict/struct and List/tuple types
  • Tests for edge cases involving unknown types, unions, intersections, and constants

❓ How to test this?

  1. Checkout the branch
  2. Run the test suite for the hashql-mir crate
  3. Verify that equality comparisons between representationally colliding types are rejected by the Postgres placement pass
  4. Confirm that safe equality comparisons are still accepted

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Feb 26, 2026 5:04pm
petrinaut Ready Ready Preview Feb 26, 2026 5:04pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Feb 26, 2026 5:04pm
hashdotdesign-tokens Ignored Ignored Preview Feb 26, 2026 5:04pm

@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 24, 2026

PR Summary

Medium Risk
Changes Postgres dispatch eligibility for ==/!= by adding a new type-walking safety check, which can alter where filters execute (DB vs interpreter) and could impact query performance/behavior if the logic is wrong. The change is well-covered by new unit and snapshot tests, but touches core type recursion utilities shared across crates.

Overview
Prevents Postgres statement placement from dispatching ==/!= when operand types could serialize to the same jsonb shape but be semantically different (notably Dict<String, _> vs struct and List<_> vs tuple, plus conservative rejection for ?/Param/Infer).

This introduces peel + is_equality_safe(_operand) with cycle detection via a now-public RecursionBoundary (and RecursiveVisitorGuard::boundary_mut()), plus a debug_panic! macro for debug-only assertions.

Adds extensive new Postgres placement and is_equality_safe tests (including recursive/union/intersection cases) and corresponding UI snapshot fixtures.

Written by Cursor Bugbot for commit 44aeaed. This will update automatically on new commits. Configure here.

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests labels Feb 24, 2026
This was referenced Feb 24, 2026
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@graphite-app graphite-app Bot requested review from a team February 24, 2026 20:22
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 97.43590% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.94%. Comparing base (e7770d8) to head (44aeaed).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...pass/execution/statement_placement/postgres/mod.rs 93.43% 6 Missing and 3 partials ⚠️
libs/@local/hashql/core/src/type/recursion.rs 50.00% 4 Missing ⚠️
libs/@local/hashql/core/src/type/visit.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8480      +/-   ##
==========================================
+ Coverage   62.70%   62.94%   +0.23%     
==========================================
  Files        1302     1302              
  Lines      131589   132494     +905     
  Branches     5487     5503      +16     
==========================================
+ Hits        82512    83396     +884     
- Misses      48169    48184      +15     
- Partials      908      914       +6     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-graph-sdk 7.78% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.86% <ø> (ø)
rust.hashql-ast 87.25% <ø> (ø)
rust.hashql-compiletest 29.69% <ø> (ø)
rust.hashql-core 82.26% <36.36%> (-0.03%) ⬇️
rust.hashql-eval 69.13% <ø> (ø)
rust.hashql-hir 89.11% <ø> (ø)
rust.hashql-mir 92.29% <98.53%> (+0.24%) ⬆️
rust.hashql-syntax-jexpr 94.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@indietyp indietyp changed the title BE-412: HashQL: Add equality safety checks for Postgres statement placement BE-421: HashQL: Add equality safety checks for Postgres statement placement Feb 26, 2026
@graphite-app graphite-app Bot changed the base branch from bm/be-420-hashql-restrict-data-types-that-can-be-transferred-into to graphite-base/8480 February 26, 2026 16:36
@indietyp indietyp force-pushed the bm/be-421-hashql-only-allow-unambiguous-comparisons-inside-postgresql branch from 4d62704 to 44aeaed Compare February 26, 2026 16:55
@graphite-app graphite-app Bot changed the base branch from graphite-base/8480 to main February 26, 2026 16:56
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Feb 26, 2026

Merge activity

  • Feb 26, 4:56 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@indietyp indietyp added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit e957752 Feb 26, 2026
100 of 120 checks passed
@indietyp indietyp deleted the bm/be-421-hashql-only-allow-unambiguous-comparisons-inside-postgresql branch February 26, 2026 17:32
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$27.7 \mathrm{ms} \pm 148 \mathrm{μs}\left({\color{gray}-0.178 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 20.7 \mathrm{μs}\left({\color{gray}-0.191 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.6 \mathrm{ms} \pm 86.6 \mathrm{μs}\left({\color{gray}-1.409 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.4 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{gray}-0.025 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.2 \mathrm{ms} \pm 113 \mathrm{μs}\left({\color{gray}0.887 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$25.0 \mathrm{ms} \pm 158 \mathrm{μs}\left({\color{gray}0.055 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.8 \mathrm{ms} \pm 178 \mathrm{μs}\left({\color{gray}-0.429 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.78 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-1.011 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.7 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}-0.789 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.93 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}0.198 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.10 \mathrm{ms} \pm 12.2 \mathrm{μs}\left({\color{gray}-0.787 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.46 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}0.034 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.34 \mathrm{ms} \pm 29.9 \mathrm{μs}\left({\color{gray}-0.075 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.71 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}0.134 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.28 \mathrm{ms} \pm 26.4 \mathrm{μs}\left({\color{gray}-0.390 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.61 \mathrm{ms} \pm 24.2 \mathrm{μs}\left({\color{gray}0.012 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.59 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}0.382 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.20 \mathrm{ms} \pm 22.5 \mathrm{μs}\left({\color{gray}-0.715 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.81 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{gray}-1.260 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{gray}-1.128 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.89 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-0.812 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.14 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}-0.850 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.95 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}-1.644 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.25 \mathrm{ms} \pm 15.8 \mathrm{μs}\left({\color{gray}-1.236 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.21 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}-0.043 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.92 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}-0.741 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.08 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}-0.074 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.69 \mathrm{ms} \pm 23.7 \mathrm{μs}\left({\color{gray}1.15 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.22 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}0.404 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.46 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}0.583 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.60 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}0.127 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.18 \mathrm{ms} \pm 17.9 \mathrm{μs}\left({\color{gray}-0.553 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.49 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}0.589 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$42.1 \mathrm{ms} \pm 178 \mathrm{μs}\left({\color{gray}-0.025 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$79.3 \mathrm{ms} \pm 394 \mathrm{μs}\left({\color{gray}0.252 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$46.6 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$49.9 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$57.4 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-0.686 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$44.3 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}1.13 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$424 \mathrm{ms} \pm 929 \mathrm{μs}\left({\color{gray}1.54 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$101 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{gray}2.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$89.8 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$327 \mathrm{ms} \pm 961 \mathrm{μs}\left({\color{gray}4.12 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$17.2 \mathrm{ms} \pm 93.9 \mathrm{μs}\left({\color{red}8.01 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$17.0 \mathrm{ms} \pm 94.0 \mathrm{μs}\left({\color{gray}4.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$17.5 \mathrm{ms} \pm 96.3 \mathrm{μs}\left({\color{red}6.69 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$16.9 \mathrm{ms} \pm 97.3 \mathrm{μs}\left({\color{gray}4.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$19.7 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}3.28 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.9 \mathrm{ms} \pm 68.6 \mathrm{μs}\left({\color{gray}0.783 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$16.5 \mathrm{ms} \pm 80.9 \mathrm{μs}\left({\color{gray}3.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$16.3 \mathrm{ms} \pm 61.1 \mathrm{μs}\left({\color{gray}1.66 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$16.8 \mathrm{ms} \pm 80.1 \mathrm{μs}\left({\color{gray}1.92 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$24.6 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}2.73 \mathrm{\%}}\right) $$ 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 $$31.0 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}0.004 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$31.4 \mathrm{ms} \pm 249 \mathrm{μs}\left({\color{gray}1.80 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$31.1 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}2.64 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$31.2 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}-3.398 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$31.5 \mathrm{ms} \pm 265 \mathrm{μs}\left({\color{gray}1.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$31.6 \mathrm{ms} \pm 257 \mathrm{μs}\left({\color{gray}-0.674 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$31.1 \mathrm{ms} \pm 273 \mathrm{μs}\left({\color{gray}0.559 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$30.6 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{gray}-3.060 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$30.9 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}-2.496 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.79 \mathrm{ms} \pm 45.3 \mathrm{μs}\left({\color{gray}-0.640 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$90.7 \mathrm{ms} \pm 381 \mathrm{μs}\left({\color{gray}-0.045 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$144 \mathrm{ms} \pm 624 \mathrm{μs}\left({\color{gray}0.187 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$97.5 \mathrm{ms} \pm 408 \mathrm{μs}\left({\color{gray}-0.599 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$106 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{gray}-0.362 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$116 \mathrm{ms} \pm 468 \mathrm{μs}\left({\color{gray}0.496 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$123 \mathrm{ms} \pm 533 \mathrm{μs}\left({\color{gray}0.180 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$88.8 \mathrm{ms} \pm 415 \mathrm{μs}\left({\color{gray}0.271 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$118 \mathrm{ms} \pm 541 \mathrm{μs}\left({\color{gray}0.015 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$95.9 \mathrm{ms} \pm 461 \mathrm{μs}\left({\color{gray}-0.056 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$104 \mathrm{ms} \pm 582 \mathrm{μs}\left({\color{gray}-0.215 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$107 \mathrm{ms} \pm 675 \mathrm{μs}\left({\color{gray}0.829 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$107 \mathrm{ms} \pm 556 \mathrm{μs}\left({\color{gray}0.675 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$136 \mathrm{ms} \pm 514 \mathrm{μs}\left({\color{gray}1.99 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$135 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}-0.318 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$67.9 \mathrm{ms} \pm 3.29 \mathrm{ms}\left({\color{lightgreen}-36.440 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$581 \mathrm{ms} \pm 1.07 \mathrm{ms}\left({\color{gray}-3.046 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

2 participants