Skip to content

BE-482: HashQL: Remove logical not from MIR and fix postgres boolean lowering#8595

Draft
indietyp wants to merge 2 commits intobm/be-474-hashql-take-into-account-terminators-eligibility-whenfrom
bm/be-482-hashql-remove-logical-not-from-unary-operators
Draft

BE-482: HashQL: Remove logical not from MIR and fix postgres boolean lowering#8595
indietyp wants to merge 2 commits intobm/be-474-hashql-take-into-account-terminators-eligibility-whenfrom
bm/be-482-hashql-remove-logical-not-from-unary-operators

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Add proper boolean vs integer operator dispatch in the PostgreSQL SQL lowering, with ICE diagnostics for ambiguous cases and snapshot test coverage for all operator paths, as well as remove dedicated UnOp for logical not, in favour of bitwise not (similar to logical and and or being replaced).

🔍 What does this change?

  • Boolean/integer SQL operator dispatch: PostgreSQL requires different SQL operators for boolean and integer operands (NOT vs ~, AND vs &, OR vs |). The lowering now inspects the operand type via integer_type() and emits the correct SQL form.
  • ICE diagnostic for ambiguous operand types: Replaced three todo!() panics in the filter compiler with a proper AmbiguousIntegerType diagnostic (Severity::Bug). This fires if the operand type cannot be classified as boolean or integer, which is currently unreachable but would surface issues if GVN ever produces union-typed operands.
  • UnOp documentation: Added enum-level and per-variant doc comments matching the existing BinOp style.
  • op! macro fix: Unary operator arms now produce hashql_mir::body::rvalue::UnOp directly instead of hashql_hir::node::operation::UnOp, fixing a type mismatch in the builder.
  • SQL pretty-printing: Improved formatting of transpiled SQL in snapshot output.
  • New snapshot tests:
    • binary_bitand_boolean_and: & on booleans lowers to AND
    • binary_bitor_boolean_or: | on booleans lowers to OR
    • binary_bitor_bigint_cast: | on integers lowers to |

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

⚠️ Known issues

A future improvement would be to trace the type via the compiled SQL expression side rather than through the MIR operand type. This would allow disambiguation in cases where integer_type() cannot resolve (e.g. union types from GVN), since the SQL expression tree could carry its own type information. This is currently not needed as there's no way a union like that could be created.

🐾 Next steps

  • Consider expression-side type tracing as an alternative to integer_type() for operator dispatch, which would handle ambiguous union types gracefully instead of emitting an ICE.

🛡 What tests cover this?

  • New snapshot tests: binary_bitand_boolean_and, binary_bitor_boolean_or, binary_bitor_bigint_cast
  • Existing snapshot tests: unary_not (boolean NOT), unary_bitnot (integer NOT), binary_bitand_bigint_cast (integer AND)

❓ How to test this?

  1. cargo test --package hashql-eval -- postgres::filter::tests
  2. Confirm all snapshot tests pass, including the three new boolean/integer operator dispatch tests.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Mar 28, 2026 9:30pm
hashdotdesign Ready Ready Preview, Comment Mar 28, 2026 9:30pm
hashdotdesign-tokens Ready Ready Preview, Comment Mar 28, 2026 9:30pm
petrinaut Ready Ready Preview Mar 28, 2026 9:30pm

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.80%. Comparing base (890a949) to head (51195eb).

Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           bm/be-474-hashql-take-into-account-terminators-eligibility-when    #8595      +/-   ##
===================================================================================================
- Coverage                                                            70.79%   63.80%   -6.99%     
===================================================================================================
  Files                                                                 1012     1183     +171     
  Lines                                                                98707   130156   +31449     
  Branches                                                              4542     4969     +427     
===================================================================================================
+ Hits                                                                 69876    83046   +13170     
- Misses                                                               28103    46249   +18146     
- Partials                                                               728      861     +133     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (?)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.88% <ø> (?)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.19% <ø> (+0.03%) ⬆️
rust.harpc-tower 66.80% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization 62.34% <ø> (?)
rust.hash-graph-postgres-store 26.74% <ø> (?)
rust.hash-graph-store 37.76% <ø> (?)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (?)
rust.hash-graph-validation 83.45% <ø> (?)
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 28.31% <ø> (ø)
rust.hashql-core 82.22% <ø> (ø)
rust.hashql-diagnostics 72.53% <ø> (ø)
rust.hashql-hir 89.06% <ø> (ø)
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.

None => {
self.diagnostics
.push(ambiguous_integer_type(span, BinOp::BitAnd.as_str()));
return Expression::Constant(query::Constant::Null);

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
None => {
self.diagnostics
.push(ambiguous_integer_type(span, BinOp::BitOr.as_str()));
return Expression::Constant(query::Constant::Null);

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
linter_config
.override_dialect(DialectKind::Postgres)
.expect("dialect should be loaded");
let mut linter =

Check warning

Code scanning / clippy

variable does not need to be mutable Warning test

variable does not need to be mutable
.lint_string(&format!("SELECT {sql}"), None, true)
.expect("should be valid SQL");

let mut fixed = linted.fix_string();

Check warning

Code scanning / clippy

variable does not need to be mutable Warning test

variable does not need to be mutable
.expect("should be valid SQL");

let mut fixed = linted.fix_string();
let fixed: String = fixed[7..]

Check warning

Code scanning / clippy

indexing into a string may panic if the index is within a UTF-8 character Warning test

indexing into a string may panic if the index is within a UTF-8 character
let mut fixed = linted.fix_string();
let fixed: String = fixed[7..]
.lines()
.map(|line| &line[4..])

Check warning

Code scanning / clippy

indexing into a string may panic if the index is within a UTF-8 character Warning test

indexing into a string may panic if the index is within a UTF-8 character
linter_config
.override_dialect(DialectKind::Postgres)
.expect("dialect should be loaded");
let mut linter =

Check warning

Code scanning / clippy

variable does not need to be mutable Warning test

variable does not need to be mutable
match env.r#type(r#type).kind.primitive()? {
PrimitiveType::Boolean => Some(IntegerType::Boolean),
PrimitiveType::Integer => Some(IntegerType::Integer),
_ => None,

Check warning

Code scanning / clippy

wildcard match will also match any future added variants Warning

wildcard match will also match any future added variants
Operand::Constant(hashql_mir::body::constant::Constant::Primitive(
hashql_core::value::Primitive::Integer(_),
)) => Some(IntegerType::Integer),
_ => None,

Check warning

Code scanning / clippy

wildcard matches only a single variant and will also match any future added variants Warning

wildcard matches only a single variant and will also match any future added variants
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 28, 2026

Merging this PR will not alter performance

✅ 56 untouched benchmarks
⏩ 24 skipped benchmarks1


Comparing bm/be-482-hashql-remove-logical-not-from-unary-operators (51195eb) with bm/be-474-hashql-take-into-account-terminators-eligibility-when (890a949)

Open in CodSpeed

Footnotes

  1. 24 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@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.2 \mathrm{ms} \pm 191 \mathrm{μs}\left({\color{gray}-1.963 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.35 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}0.198 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.1 \mathrm{ms} \pm 92.6 \mathrm{μs}\left({\color{gray}-0.114 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.4 \mathrm{ms} \pm 374 \mathrm{μs}\left({\color{gray}-2.866 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.8 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}1.25 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.7 \mathrm{ms} \pm 179 \mathrm{μs}\left({\color{gray}-4.869 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.1 \mathrm{ms} \pm 190 \mathrm{μs}\left({\color{gray}-1.349 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.63 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}-1.803 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.2 \mathrm{ms} \pm 125 \mathrm{μs}\left({\color{gray}-0.896 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.83 \mathrm{ms} \pm 23.0 \mathrm{μs}\left({\color{gray}1.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}2.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.40 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.34 \mathrm{ms} \pm 33.9 \mathrm{μs}\left({\color{gray}4.82 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 21.6 \mathrm{μs}\left({\color{gray}0.433 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.11 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}-0.104 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.46 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}1.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.40 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}1.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.21 \mathrm{ms} \pm 28.9 \mathrm{μs}\left({\color{gray}4.63 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.66 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{gray}-0.067 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.60 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{gray}-0.716 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.71 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-0.576 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.99 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-0.036 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.79 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}0.659 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.07 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}-0.242 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.05 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}-0.982 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.77 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.91 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}-2.813 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.50 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.16 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-1.333 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.30 \mathrm{ms} \pm 21.5 \mathrm{μs}\left({\color{gray}-4.868 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.39 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}0.029 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}-3.689 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.31 \mathrm{ms} \pm 33.1 \mathrm{μs}\left({\color{gray}-0.274 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$43.9 \mathrm{ms} \pm 200 \mathrm{μs}\left({\color{gray}0.777 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$80.3 \mathrm{ms} \pm 427 \mathrm{μs}\left({\color{gray}-1.030 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$49.1 \mathrm{ms} \pm 206 \mathrm{μs}\left({\color{gray}-0.070 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$52.1 \mathrm{ms} \pm 356 \mathrm{μs}\left({\color{gray}2.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$59.1 \mathrm{ms} \pm 314 \mathrm{μs}\left({\color{gray}-1.595 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$45.5 \mathrm{ms} \pm 204 \mathrm{μs}\left({\color{gray}-0.462 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$418 \mathrm{ms} \pm 1.20 \mathrm{ms}\left({\color{gray}-0.623 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$99.8 \mathrm{ms} \pm 433 \mathrm{μs}\left({\color{gray}-0.015 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$88.8 \mathrm{ms} \pm 353 \mathrm{μs}\left({\color{gray}-0.899 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$287 \mathrm{ms} \pm 809 \mathrm{μs}\left({\color{lightgreen}-8.347 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$18.8 \mathrm{ms} \pm 96.7 \mathrm{μs}\left({\color{gray}-1.811 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$19.6 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{gray}-1.015 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$19.6 \mathrm{ms} \pm 91.2 \mathrm{μs}\left({\color{gray}-1.372 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$19.6 \mathrm{ms} \pm 109 \mathrm{μs}\left({\color{gray}-0.395 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.0 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}0.954 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$18.7 \mathrm{ms} \pm 97.5 \mathrm{μs}\left({\color{gray}-2.809 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$18.9 \mathrm{ms} \pm 126 \mathrm{μs}\left({\color{gray}0.412 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.0 \mathrm{ms} \pm 108 \mathrm{μs}\left({\color{gray}0.038 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$19.4 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{gray}0.366 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.0 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}1.93 \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 $$32.1 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{gray}-2.138 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$35.3 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}2.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$33.0 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}-2.585 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.1 \mathrm{ms} \pm 285 \mathrm{μs}\left({\color{gray}-0.854 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$35.6 \mathrm{ms} \pm 328 \mathrm{μs}\left({\color{gray}4.91 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.8 \mathrm{ms} \pm 269 \mathrm{μs}\left({\color{gray}-0.361 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$34.5 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}0.538 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$34.2 \mathrm{ms} \pm 336 \mathrm{μs}\left({\color{gray}3.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$34.5 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}1.23 \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.32 \mathrm{ms} \pm 42.5 \mathrm{μs}\left({\color{gray}0.182 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$94.5 \mathrm{ms} \pm 528 \mathrm{μs}\left({\color{gray}0.835 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$142 \mathrm{ms} \pm 630 \mathrm{μs}\left({\color{gray}-0.984 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$101 \mathrm{ms} \pm 586 \mathrm{μs}\left({\color{gray}1.06 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$110 \mathrm{ms} \pm 606 \mathrm{μs}\left({\color{gray}-0.489 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 676 \mathrm{μs}\left({\color{gray}-2.065 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$125 \mathrm{ms} \pm 766 \mathrm{μs}\left({\color{gray}1.19 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$98.6 \mathrm{ms} \pm 461 \mathrm{μs}\left({\color{gray}-1.071 \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 $$127 \mathrm{ms} \pm 686 \mathrm{μs}\left({\color{gray}-1.068 \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 $$105 \mathrm{ms} \pm 596 \mathrm{μs}\left({\color{gray}-1.403 \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 $$114 \mathrm{ms} \pm 821 \mathrm{μs}\left({\color{gray}-1.792 \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 $$116 \mathrm{ms} \pm 784 \mathrm{μs}\left({\color{gray}-0.679 \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 $$117 \mathrm{ms} \pm 695 \mathrm{μs}\left({\color{gray}0.479 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$133 \mathrm{ms} \pm 639 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$144 \mathrm{ms} \pm 474 \mathrm{μs}\left({\color{gray}2.56 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$103 \mathrm{ms} \pm 417 \mathrm{μs}\left({\color{gray}-2.509 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$543 \mathrm{ms} \pm 2.42 \mathrm{ms}\left({\color{gray}-1.984 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/deps Relates to third-party dependencies (area) 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