Skip to content

Comments

BE-415: Unify Condition and Expression types in PostgreSQL query builder#8467

Merged
TimDiekmann merged 3 commits intomainfrom
t/be-415-allow-for-expressions-inside-conditions-inside-a-select
Feb 23, 2026
Merged

BE-415: Unify Condition and Expression types in PostgreSQL query builder#8467
TimDiekmann merged 3 commits intomainfrom
t/be-415-allow-for-expressions-inside-conditions-inside-a-select

Conversation

@TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

This PR consolidates the SQL query generation architecture by merging the separate Condition type into the Expression type. Previously, conditions (boolean expressions) and value expressions were handled as distinct types, but since SQL treats conditions as boolean-valued expressions, this unification simplifies the codebase and enables more natural composition of boolean logic.

🔗 Related links

  • ...

🚫 Blocked by

  • ...

🔍 What does this change?

  • Removes the separate Condition enum and merges all its variants into the Expression enum
  • Adds new expression variants for boolean operations: All, Any, Unary, Binary, StartsWith, EndsWith, ContainsSegment
  • Introduces BinaryExpression and UnaryExpression types with corresponding operators for structured binary/unary operations
  • Adds convenience constructor methods on Expression (e.g., equal(), not(), all()) to reduce Box::new() boilerplate
  • Updates TableHook type alias to return Vec<Expression> instead of Vec<Condition>
  • Removes the Expression::Condition wrapper variant that was used to embed conditions in expressions
  • Updates all condition compilation methods to return Expression instead of Condition
  • Moves condition-related tests from the deleted condition.rs module into the expression module
  • Updates CosineDistance from a standalone expression variant to use the new binary expression structure

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?

  • Existing unit tests for condition transpilation have been moved to the expression module and continue to pass
  • All existing query compilation tests verify the refactored architecture works correctly

❓ How to test this?

  1. Checkout the branch
  2. Run the existing test suite to verify all SQL generation continues to work correctly
  3. Confirm that complex filter conditions still transpile to the expected SQL output

📹 Demo

The query builder artificially separated `Condition` (boolean SQL) from
`Expression` (value SQL). In SQL, conditions are boolean-valued
expressions — there is no fundamental distinction. This prevented
natural composition like negating an arbitrary boolean expression.

Merge all 16 `Condition` variants into `Expression`, add convenience
constructors to avoid `Box::new()` boilerplate, and delete the now-
redundant `condition.rs` module. The `Expression::Condition` wrapper
variant is also removed since conditions are now first-class expressions.
Introduce `UnaryExpression`/`UnaryOperator` and `BinaryExpression`/`BinaryOperator`
structs to replace the 14 individual condition variants on `Expression`. The enum
shrinks from 26 to 15 variants while the external API (convenience constructors)
remains unchanged.
@cursor
Copy link

cursor bot commented Feb 22, 2026

PR Summary

Medium Risk
Touches core SQL generation and filter compilation paths; while largely a mechanical refactor with tests migrated, subtle differences in transpiled SQL (parentheses/operator formatting) could affect query behavior or planner edge cases.

Overview
Unifies boolean conditions and value expressions by deleting condition.rs and folding its variants into Expression, including new Unary/Binary expression nodes (with UnaryOperator/BinaryOperator) and boolean helpers like all, any, not, and comparison constructors.

Updates the query compiler and AST plumbing to use Expression everywhere conditions were previously required (filters, table hooks, join ON conditions, WhereExpression), and migrates condition transpilation tests into expression/conditional.rs. Also refactors cosine distance rendering to use the new binary-operator structure and adjusts expected SQL formatting in select tests (parentheses changes).

Written by Cursor Bugbot for commit 030ccf8. 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 labels Feb 22, 2026
@vercel
Copy link

vercel bot commented Feb 22, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Feb 23, 2026 2:05am
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Feb 23, 2026 2:05am
hashdotdesign-tokens Ignored Ignored Preview Feb 23, 2026 2:05am
petrinaut Skipped Skipped Feb 23, 2026 2:05am

@augmentcode
Copy link

augmentcode bot commented Feb 22, 2026

🤖 Augment PR Summary

Summary: Refactors the PostgreSQL query builder to treat boolean conditions as first-class Expressions, removing the separate Condition type.

Changes:

  • Deleted Condition and folded its boolean variants into Expression (e.g. All, Any, StartsWith, EndsWith, ContainsSegment).
  • Introduced structured UnaryExpression/BinaryExpression nodes and operator enums to represent unary/binary operations.
  • Added convenience constructors on Expression (e.g. equal, not, overlap, cosine_distance) to reduce boxing boilerplate.
  • Updated compilation and hook types (e.g. TableHook, WhereExpression, JOIN ON conditions) to use Expression throughout.
  • Refactored cosine-distance generation to use the new binary operator structure.
  • Moved condition transpilation tests into the expression module and updated expected SQL output accordingly.

Technical Notes: Boolean transpilation now lives entirely in Expression::transpile, enabling more natural boolean composition (including applying NOT to any boolean-valued expression).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@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.

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 92.47573% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.91%. Comparing base (1066022) to head (030ccf8).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...src/store/postgres/query/expression/conditional.rs 93.65% 21 Missing ⚠️
...postgres-store/src/store/postgres/query/compile.rs 78.12% 5 Missing and 2 partials ⚠️
...tore/src/store/postgres/query/expression/binary.rs 88.46% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8467      +/-   ##
==========================================
+ Coverage   60.90%   60.91%   +0.01%     
==========================================
  Files        1275     1276       +1     
  Lines      124852   124917      +65     
  Branches     5349     5349              
==========================================
+ Hits        76041    76099      +58     
- Misses      47930    47937       +7     
  Partials      881      881              
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.hash-graph-postgres-store 27.44% <92.47%> (+0.24%) ⬆️

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.

The ::TIMESTAMPTZ suffix was on the wrong operator — it belongs to
TimeIntervalContainsTimestamp (which appends it to the RHS via
transpile_post), not to Overlap (which is plain &&).
@github-actions
Copy link
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.0 \mathrm{ms} \pm 138 \mathrm{μs}\left({\color{gray}0.995 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$11.9 \mathrm{ms} \pm 57.2 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.6 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}3.11 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.1 \mathrm{ms} \pm 87.6 \mathrm{μs}\left({\color{gray}4.04 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.3 \mathrm{ms} \pm 148 \mathrm{μs}\left({\color{gray}2.22 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.8 \mathrm{ms} \pm 168 \mathrm{μs}\left({\color{gray}0.095 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}0.773 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$12.9 \mathrm{ms} \pm 76.3 \mathrm{μs}\left({\color{gray}0.721 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.66 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}2.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.83 \mathrm{ms} \pm 15.1 \mathrm{μs}\left({\color{gray}0.886 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.20 \mathrm{ms} \pm 15.1 \mathrm{μs}\left({\color{gray}1.25 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.98 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}0.258 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.44 \mathrm{ms} \pm 17.6 \mathrm{μs}\left({\color{gray}2.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.98 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}2.03 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.25 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}1.79 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}1.91 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.84 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}0.129 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.59 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.50 \mathrm{ms} \pm 8.55 \mathrm{μs}\left({\color{gray}-0.205 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.64 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.91 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}1.15 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.69 \mathrm{ms} \pm 15.1 \mathrm{μs}\left({\color{gray}0.500 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.96 \mathrm{ms} \pm 13.1 \mathrm{μs}\left({\color{gray}0.383 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.95 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}1.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.66 \mathrm{ms} \pm 11.1 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.80 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}1.28 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.34 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}0.867 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}2.48 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.13 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{gray}0.851 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.22 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-0.733 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}3.08 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.13 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}1.28 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$38.9 \mathrm{ms} \pm 173 \mathrm{μs}\left({\color{gray}0.844 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$75.7 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}-0.429 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$42.7 \mathrm{ms} \pm 200 \mathrm{μs}\left({\color{gray}0.095 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.7 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$53.0 \mathrm{ms} \pm 350 \mathrm{μs}\left({\color{gray}-0.210 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$40.4 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{gray}0.466 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$421 \mathrm{ms} \pm 995 \mathrm{μs}\left({\color{gray}1.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$95.5 \mathrm{ms} \pm 465 \mathrm{μs}\left({\color{gray}2.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.1 \mathrm{ms} \pm 487 \mathrm{μs}\left({\color{gray}-1.016 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$283 \mathrm{ms} \pm 874 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.9 \mathrm{ms} \pm 69.1 \mathrm{μs}\left({\color{gray}0.047 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$15.2 \mathrm{ms} \pm 88.3 \mathrm{μs}\left({\color{gray}2.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.8 \mathrm{ms} \pm 94.0 \mathrm{μs}\left({\color{gray}4.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$15.2 \mathrm{ms} \pm 81.0 \mathrm{μs}\left({\color{gray}4.75 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.3 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{gray}2.07 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.8 \mathrm{ms} \pm 68.4 \mathrm{μs}\left({\color{gray}-0.037 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.7 \mathrm{ms} \pm 73.0 \mathrm{μs}\left({\color{gray}0.658 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.6 \mathrm{ms} \pm 63.6 \mathrm{μs}\left({\color{gray}0.559 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.6 \mathrm{ms} \pm 76.1 \mathrm{μs}\left({\color{gray}2.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.8 \mathrm{ms} \pm 134 \mathrm{μs}\left({\color{gray}0.480 \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 $$29.7 \mathrm{ms} \pm 311 \mathrm{μs}\left({\color{gray}1.99 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.4 \mathrm{ms} \pm 309 \mathrm{μs}\left({\color{gray}-0.874 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.6 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}2.78 \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 302 \mathrm{μs}\left({\color{gray}0.052 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.5 \mathrm{ms} \pm 270 \mathrm{μs}\left({\color{gray}0.652 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.5 \mathrm{ms} \pm 269 \mathrm{μs}\left({\color{gray}-0.119 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$30.2 \mathrm{ms} \pm 306 \mathrm{μs}\left({\color{gray}-0.792 \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 305 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$31.4 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}3.34 \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.02 \mathrm{ms} \pm 27.3 \mathrm{μs}\left({\color{gray}-0.273 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$88.0 \mathrm{ms} \pm 397 \mathrm{μs}\left({\color{gray}0.586 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$139 \mathrm{ms} \pm 596 \mathrm{μs}\left({\color{gray}-1.190 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$94.9 \mathrm{ms} \pm 461 \mathrm{μs}\left({\color{gray}0.758 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$103 \mathrm{ms} \pm 632 \mathrm{μs}\left({\color{gray}0.912 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$111 \mathrm{ms} \pm 499 \mathrm{μs}\left({\color{gray}0.116 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 643 \mathrm{μs}\left({\color{gray}-0.004 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$86.7 \mathrm{ms} \pm 380 \mathrm{μs}\left({\color{gray}-1.386 \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 $$114 \mathrm{ms} \pm 498 \mathrm{μs}\left({\color{gray}0.626 \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 $$94.0 \mathrm{ms} \pm 448 \mathrm{μs}\left({\color{gray}-1.147 \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 $$102 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{gray}-1.309 \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 $$104 \mathrm{ms} \pm 381 \mathrm{μs}\left({\color{gray}0.282 \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 $$104 \mathrm{ms} \pm 417 \mathrm{μs}\left({\color{gray}-0.071 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$131 \mathrm{ms} \pm 532 \mathrm{μs}\left({\color{gray}4.40 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$133 \mathrm{ms} \pm 576 \mathrm{μs}\left({\color{red}5.97 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$102 \mathrm{ms} \pm 566 \mathrm{μs}\left({\color{red}160 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$564 \mathrm{ms} \pm 2.12 \mathrm{ms}\left({\color{gray}-1.517 \mathrm{\%}}\right) $$ Flame Graph

@TimDiekmann TimDiekmann added this pull request to the merge queue Feb 23, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 23, 2026
@TimDiekmann TimDiekmann added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 61c08ec Feb 23, 2026
84 checks passed
@TimDiekmann TimDiekmann deleted the t/be-415-allow-for-expressions-inside-conditions-inside-a-select branch February 23, 2026 12:30
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) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

2 participants