Skip to content

BE-474: HashQL: Take into account terminator target eligibility in execution backend placement#8587

Open
indietyp wants to merge 10 commits intobm/be-455-hashql-create-evaluation-target-coordinatorfrom
bm/be-474-hashql-take-into-account-terminators-eligibility-when
Open

BE-474: HashQL: Take into account terminator target eligibility in execution backend placement#8587
indietyp wants to merge 10 commits intobm/be-455-hashql-create-evaluation-target-coordinatorfrom
bm/be-474-hashql-take-into-account-terminators-eligibility-when

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

🔗 Related links

  • ...

🚫 Blocked by

  • ...

🔍 What does this change?

  • ...

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

🐾 Next steps

🛡 What tests cover this?

❓ How to test this?

  1. Checkout the branch / view the deployment
  2. Try X
  3. Confirm that Y

📹 Demo

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 26, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment May 4, 2026 11:47am
petrinaut Ready Ready Preview May 4, 2026 11:47am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview May 4, 2026 11:47am
hashdotdesign-tokens Ignored Ignored Preview May 4, 2026 11:47am

Copy link
Copy Markdown
Member Author

indietyp commented Mar 26, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 97.21329% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.06%. Comparing base (6a40e25) to head (2dbacd8).

Files with missing lines Patch % Lines
...ass/execution/statement_placement/embedding/mod.rs 53.12% 15 Missing ⚠️
libs/@local/hashql/mir/src/pretty/text.rs 75.00% 7 Missing ⚠️
...cal/hashql/mir/src/pass/execution/splitting/mod.rs 97.01% 1 Missing and 1 partial ⚠️
...pass/execution/statement_placement/postgres/mod.rs 93.75% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                    Coverage Diff                                    @@
##           bm/be-455-hashql-create-evaluation-target-coordinator    #8587      +/-   ##
=========================================================================================
+ Coverage                                                  63.46%   68.06%   +4.59%     
=========================================================================================
  Files                                                       1270     1041     -229     
  Lines                                                     136782    98161   -38621     
  Branches                                                    5476     4902     -574     
=========================================================================================
- Hits                                                       86809    66810   -19999     
+ Misses                                                     49065    30644   -18421     
+ Partials                                                     908      707     -201     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.41% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system ?
local.hash-backend-utils 0.00% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.error-stack ?
rust.harpc-net ?
rust.harpc-wire-protocol ?
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization ?
rust.hash-graph-postgres-store ?
rust.hash-graph-store ?
rust.hash-graph-types ?
rust.hash-graph-validation ?
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 28.26% <ø> (ø)
rust.hashql-core 82.22% <100.00%> (+0.04%) ⬆️
rust.hashql-eval 79.60% <ø> (-0.10%) ⬇️
rust.hashql-hir 89.06% <ø> (ø)
rust.hashql-mir 91.71% <97.00%> (+0.12%) ⬆️
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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 26, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing bm/be-474-hashql-take-into-account-terminators-eligibility-when (2dbacd8) with bm/be-455-hashql-create-evaluation-target-coordinator (6a40e25)

Open in CodSpeed

@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.8 \mathrm{ms} \pm 136 \mathrm{μs}\left({\color{gray}-3.901 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 25.6 \mathrm{μs}\left({\color{gray}-1.700 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$13.4 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{gray}-1.260 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.8 \mathrm{ms} \pm 324 \mathrm{μs}\left({\color{gray}0.081 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$16.1 \mathrm{ms} \pm 190 \mathrm{μs}\left({\color{gray}2.07 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$25.5 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}-2.757 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.6 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}-3.797 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.87 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}-1.648 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.5 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{gray}0.078 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$4.00 \mathrm{ms} \pm 33.0 \mathrm{μs}\left({\color{gray}0.065 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.21 \mathrm{ms} \pm 30.7 \mathrm{μs}\left({\color{gray}0.543 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.56 \mathrm{ms} \pm 26.8 \mathrm{μs}\left({\color{gray}1.03 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.39 \mathrm{ms} \pm 25.8 \mathrm{μs}\left({\color{gray}-2.828 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.78 \mathrm{ms} \pm 26.9 \mathrm{μs}\left({\color{gray}-0.259 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.34 \mathrm{ms} \pm 26.0 \mathrm{μs}\left({\color{gray}-3.130 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.73 \mathrm{ms} \pm 35.4 \mathrm{μs}\left({\color{gray}0.652 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}-0.402 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.33 \mathrm{ms} \pm 28.9 \mathrm{μs}\left({\color{gray}0.790 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.90 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}-0.291 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.92 \mathrm{ms} \pm 30.9 \mathrm{μs}\left({\color{gray}0.977 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.97 \mathrm{ms} \pm 15.8 \mathrm{μs}\left({\color{gray}0.719 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.25 \mathrm{ms} \pm 23.0 \mathrm{μs}\left({\color{gray}-0.161 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.02 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}-0.278 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.36 \mathrm{ms} \pm 28.5 \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.26 \mathrm{ms} \pm 23.9 \mathrm{μs}\left({\color{gray}-0.203 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-1.244 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.14 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}-1.640 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.73 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-2.972 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.29 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}1.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.48 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}-0.790 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.69 \mathrm{ms} \pm 36.7 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.30 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{gray}0.908 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.60 \mathrm{ms} \pm 31.2 \mathrm{μs}\left({\color{gray}1.61 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$47.7 \mathrm{ms} \pm 288 \mathrm{μs}\left({\color{gray}1.93 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$84.9 \mathrm{ms} \pm 455 \mathrm{μs}\left({\color{gray}-1.485 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$51.7 \mathrm{ms} \pm 464 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$54.4 \mathrm{ms} \pm 351 \mathrm{μs}\left({\color{gray}-2.555 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$65.0 \mathrm{ms} \pm 508 \mathrm{μs}\left({\color{gray}1.26 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$49.2 \mathrm{ms} \pm 380 \mathrm{μs}\left({\color{gray}-1.111 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$421 \mathrm{ms} \pm 1.28 \mathrm{ms}\left({\color{gray}-0.152 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$107 \mathrm{ms} \pm 593 \mathrm{μs}\left({\color{gray}1.15 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$94.2 \mathrm{ms} \pm 483 \mathrm{μs}\left({\color{gray}-0.753 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$300 \mathrm{ms} \pm 1.11 \mathrm{ms}\left({\color{lightgreen}-9.506 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$20.7 \mathrm{ms} \pm 125 \mathrm{μs}\left({\color{gray}0.654 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$21.4 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$21.3 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{gray}0.468 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$21.5 \mathrm{ms} \pm 133 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$25.3 \mathrm{ms} \pm 140 \mathrm{μs}\left({\color{gray}-1.958 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$21.2 \mathrm{ms} \pm 150 \mathrm{μs}\left({\color{gray}3.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$20.4 \mathrm{ms} \pm 118 \mathrm{μs}\left({\color{gray}-3.548 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$20.5 \mathrm{ms} \pm 170 \mathrm{μs}\left({\color{gray}-0.883 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$21.4 \mathrm{ms} \pm 208 \mathrm{μs}\left({\color{gray}2.00 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$27.7 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}-0.719 \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 $$37.0 \mathrm{ms} \pm 405 \mathrm{μs}\left({\color{gray}2.99 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$37.8 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}2.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$36.4 \mathrm{ms} \pm 366 \mathrm{μs}\left({\color{gray}-1.189 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.8 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{gray}0.090 \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 330 \mathrm{μs}\left({\color{gray}-0.308 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$36.0 \mathrm{ms} \pm 323 \mathrm{μs}\left({\color{gray}-0.903 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$35.2 \mathrm{ms} \pm 319 \mathrm{μs}\left({\color{gray}-0.922 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$35.8 \mathrm{ms} \pm 372 \mathrm{μs}\left({\color{gray}-1.825 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$35.1 \mathrm{ms} \pm 386 \mathrm{μs}\left({\color{gray}-1.985 \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.92 \mathrm{ms} \pm 51.3 \mathrm{μs}\left({\color{gray}-0.900 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$97.9 \mathrm{ms} \pm 781 \mathrm{μs}\left({\color{gray}-2.317 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$151 \mathrm{ms} \pm 659 \mathrm{μs}\left({\color{gray}-0.213 \mathrm{\%}}\right) $$
entity_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 684 \mathrm{μs}\left({\color{gray}-1.201 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$115 \mathrm{ms} \pm 933 \mathrm{μs}\left({\color{gray}1.04 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$124 \mathrm{ms} \pm 851 \mathrm{μs}\left({\color{gray}-0.325 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$132 \mathrm{ms} \pm 1.08 \mathrm{ms}\left({\color{gray}-0.386 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$105 \mathrm{ms} \pm 702 \mathrm{μs}\left({\color{gray}-2.290 \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 $$135 \mathrm{ms} \pm 634 \mathrm{μs}\left({\color{gray}-0.320 \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 $$112 \mathrm{ms} \pm 658 \mathrm{μs}\left({\color{gray}-0.420 \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 $$122 \mathrm{ms} \pm 691 \mathrm{μs}\left({\color{gray}0.684 \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 $$125 \mathrm{ms} \pm 730 \mathrm{μs}\left({\color{gray}1.48 \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 $$126 \mathrm{ms} \pm 801 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$133 \mathrm{ms} \pm 657 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$142 \mathrm{ms} \pm 589 \mathrm{μs}\left({\color{gray}0.748 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$106 \mathrm{ms} \pm 582 \mathrm{μs}\left({\color{gray}-0.316 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$545 \mathrm{ms} \pm 1.43 \mathrm{ms}\left({\color{gray}-2.774 \mathrm{\%}}\right) $$ Flame Graph

@indietyp indietyp force-pushed the bm/be-455-hashql-create-evaluation-target-coordinator branch from 95af2dc to 8045f18 Compare March 31, 2026 20:56
@indietyp indietyp force-pushed the bm/be-474-hashql-take-into-account-terminators-eligibility-when branch from 890a949 to 591383f Compare March 31, 2026 20:56
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

Deployment failed with the following error:

Invalid request: `attribution.gitUser` should NOT have additional property `isBot`.

Comment thread libs/@local/hashql/mir/src/pass/execution/cost/mod.rs
@indietyp indietyp force-pushed the bm/be-474-hashql-take-into-account-terminators-eligibility-when branch from 1646ca9 to fb03f81 Compare April 29, 2026 15:32
@indietyp indietyp force-pushed the bm/be-455-hashql-create-evaluation-target-coordinator branch from f722e52 to 83bf74a Compare April 29, 2026 15:32
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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2add45e. Configure here.

@indietyp indietyp force-pushed the bm/be-474-hashql-take-into-account-terminators-eligibility-when branch from 2add45e to e6a3adb Compare April 29, 2026 15:51
@indietyp indietyp force-pushed the bm/be-455-hashql-create-evaluation-target-coordinator branch from 83bf74a to e30f552 Compare April 29, 2026 15:51
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 29, 2026

🤖 Augment PR Summary

Summary: Updates HashQL execution planning so backend placement accounts for whether a block’s terminator can run on a target (and what it costs), not just the block’s statements.

Changes:

  • Adds `FiniteBitSet::is_superset` / `is_subset` helpers (with tests) to compare target domains.
  • Introduces per-block TerminatorCostVec and threads terminator costs through statement placement, block splitting, and cost aggregation.
  • Extends basic-block splitting to optionally peel off a dedicated “terminator region” when terminator support is narrower/incomparable vs the last statement region.
  • Ensures synthesized split-chain Goto terminators get zero terminator cost via TerminatorCostVec::remap tests.
  • Renames/clarifies transition-matrix costs to TerminatorTransitionCostVec for the solver/AC-3 path, separating “transition costs” from “terminator execution costs”.
  • Updates MIR text formatting to support terminator annotations, and refreshes UI/snapshot expectations accordingly.
  • Adjusts eval UI postgres outputs to reflect updated planning/continuation SQL generation.

Notes: This touches core placement/solver inputs (domains, splitting, cost aggregation), so correctness hinges on terminator eligibility being represented consistently across targets and after splitting.

🤖 Was this summary useful? React with 👍 or 👎

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. 2 suggestions posted.

Fix All in Augment

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

Comment thread libs/@local/hashql/mir/src/pass/execution/cost/mod.rs
Comment thread libs/@local/hashql/eval/tests/ui/postgres/constant-true-filter.aux.mir.orig Outdated
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.

1 participant