Skip to content

BE-418: Add ROW constructor expression to PostgreSQL query builder#8470

Open
TimDiekmann wants to merge 6 commits intomainfrom
t/be-418-implement-row-constructor-expressions
Open

BE-418: Add ROW constructor expression to PostgreSQL query builder#8470
TimDiekmann wants to merge 6 commits intomainfrom
t/be-418-implement-row-constructor-expressions

Conversation

@TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

This PR adds support for PostgreSQL row constructors in the query expression system. Row constructors allow building composite row values from individual expressions, which is useful for creating structured data in SQL queries.

🔗 Related links

  • ...

🚫 Blocked by

  • ...

🔍 What does this change?

  • Adds a new Row(Vec<Self>) variant to the Expression enum for representing row constructors
  • Implements the Transpile trait for the new Row variant, generating ROW(e1, e2, ...) syntax in PostgreSQL
  • Includes proper comma separation between expressions within the row constructor

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 vercel bot temporarily deployed to Preview – petrinaut February 22, 2026 23:54 Inactive
@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 25, 2026 9:14am
petrinaut Ready Ready Preview Feb 25, 2026 9:14am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Feb 25, 2026 9:14am
hashdotdesign-tokens Ignored Ignored Preview Feb 25, 2026 9:14am

@cursor
Copy link

cursor bot commented Feb 22, 2026

PR Summary

Low Risk
Small, additive change confined to SQL string generation for a new expression variant, with targeted unit tests and no changes to existing variants’ behavior.

Overview
Adds support for PostgreSQL row constructors in the query expression AST by introducing Expression::Row(Vec<Expression>).

Transpile now renders this variant as ROW(e1, e2, ...) (including empty and single-element rows), and new unit tests assert correct SQL output and comma separation.

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

@augmentcode
Copy link

augmentcode bot commented Feb 22, 2026

🤖 Augment PR Summary

Summary: Adds PostgreSQL row constructor support to the query expression system.
Changes: Introduces Expression::Row(Vec<Expression>) and transpiles it to ROW(e1, e2, ...) syntax.

🤖 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. 1 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.58%. Comparing base (d2cf73a) to head (080512e).

Additional details and impacted files
@@                                          Coverage Diff                                          @@
##           t/be-417-include-binary-and-unary-operation-support-inside-of-select    #8470   +/-   ##
=====================================================================================================
  Coverage                                                                 62.58%   62.58%           
=====================================================================================================
  Files                                                                      1296     1296           
  Lines                                                                    130967   130967           
  Branches                                                                   5480     5480           
=====================================================================================================
  Hits                                                                      81961    81961           
  Misses                                                                    48096    48096           
  Partials                                                                    910      910           
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% <ø> (ø)

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.

Cover empty, single-element, and multi-element cases to lock in
comma separation and exact SQL rendering behavior.
@vercel vercel bot temporarily deployed to Preview – petrinaut February 23, 2026 01:39 Inactive
@TimDiekmann TimDiekmann changed the base branch from t/be-417-include-binary-and-unary-operation-support-inside-of-select to graphite-base/8470 February 23, 2026 01:58
@TimDiekmann TimDiekmann force-pushed the t/be-418-implement-row-constructor-expressions branch from 65a0d86 to 18f3e00 Compare February 23, 2026 09:45
@vercel vercel bot temporarily deployed to Preview – petrinaut February 23, 2026 09:46 Inactive
@TimDiekmann TimDiekmann changed the base branch from graphite-base/8470 to t/be-417-include-binary-and-unary-operation-support-inside-of-select February 23, 2026 09:46
@TimDiekmann TimDiekmann force-pushed the t/be-417-include-binary-and-unary-operation-support-inside-of-select branch from f26e9dc to d2ec8c0 Compare February 23, 2026 14:30
@TimDiekmann TimDiekmann force-pushed the t/be-418-implement-row-constructor-expressions branch from 18f3e00 to 2c63027 Compare February 23, 2026 14:30
@graphite-app graphite-app bot changed the base branch from t/be-417-include-binary-and-unary-operation-support-inside-of-select to graphite-base/8470 February 24, 2026 09:09
…ic expressions

Extend the query builder with full SQL operator coverage:

- BinaryOperator: arithmetic (+, -, *, /, %), bitwise (&, |),
  and JSON access (->, ->>) operators. JSON operators remain binary
  despite being syntactically chainable because chaining is left-
  associative traversal, not a commutative/associative operation
  like AND/OR/||.

- UnaryOperator: negation (-) and bitwise NOT (~).

- VariadicExpression: new expression type for n-ary operators (AND,
  OR, ||) replacing the ad-hoc All/Any variants on Expression and
  Function::ArrayConcat.

- Remove Function::JsonDeleteKeys (replaced by BinaryOperator::Subtract)
  and Function::ArrayConcat (replaced by VariadicOperator::Concatenate).
- Add debug_assert in VariadicOperator::Concatenate to catch empty-list
  misuse early; update doc to use a proper # Panics section.

- Add Expression::Grouped(Box<Self>) that transpiles to (expr), for
  explicit control over operator precedence.

- Wrap the property-masking subtraction in Grouped so that subsequent
  JSON operators (->/->>) compose correctly. In PostgreSQL, -> has
  higher precedence than -, so without parens `col - keys -> 'f'`
  would parse as `col - (keys -> 'f')`.
@TimDiekmann TimDiekmann force-pushed the t/be-418-implement-row-constructor-expressions branch from 2c63027 to 0434d89 Compare February 24, 2026 09:45
@TimDiekmann TimDiekmann changed the base branch from graphite-base/8470 to t/be-417-include-binary-and-unary-operation-support-inside-of-select February 24, 2026 09:45
Copy link

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

expr.transpile(fmt)?;
}
fmt.write_char(')')
}
Copy link

Choose a reason for hiding this comment

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

Empty row constructor emits invalid SQL

Low Severity

Expression::Row allows an empty Vec and transpiles it to ROW(). PostgreSQL row-constructor syntax expects at least one expression, so this branch can generate invalid SQL at runtime when an empty row is built.

Additional Locations (1)

Fix in Cursor Fix in Web

Add Expression::Row(Vec<Self>) variant that transpiles to
ROW(e1, e2, ...) in PostgreSQL. This is the inverse of the
existing RowExpansion and is required for converging different
query paths into a single composite row value.
@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 $$28.3 \mathrm{ms} \pm 153 \mathrm{μs}\left({\color{gray}-2.070 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.36 \mathrm{ms} \pm 22.4 \mathrm{μs}\left({\color{gray}-0.871 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$13.5 \mathrm{ms} \pm 68.4 \mathrm{μs}\left({\color{gray}-2.964 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.0 \mathrm{ms} \pm 325 \mathrm{μs}\left({\color{gray}-0.492 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.0 \mathrm{ms} \pm 93.3 \mathrm{μs}\left({\color{gray}3.46 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.3 \mathrm{ms} \pm 139 \mathrm{μs}\left({\color{gray}-0.084 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.1 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}-0.478 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.79 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-1.554 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.8 \mathrm{ms} \pm 104 \mathrm{μs}\left({\color{gray}-1.416 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.64 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-2.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.87 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-0.991 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.21 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}-1.265 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.04 \mathrm{ms} \pm 23.9 \mathrm{μs}\left({\color{gray}-3.378 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.42 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-1.025 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.98 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}-1.688 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.32 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}0.266 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.33 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}0.052 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.01 \mathrm{ms} \pm 33.7 \mathrm{μs}\left({\color{gray}1.82 \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 13.2 \mathrm{μs}\left({\color{gray}0.301 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.61 \mathrm{ms} \pm 11.8 \mathrm{μs}\left({\color{gray}0.754 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.70 \mathrm{ms} \pm 12.2 \mathrm{μs}\left({\color{gray}-1.271 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.16 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{red}7.10 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{gray}-0.980 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.08 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{gray}0.963 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.99 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-0.000 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 10.3 \mathrm{μs}\left({\color{gray}-1.301 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.87 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}0.698 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.40 \mathrm{ms} \pm 21.2 \mathrm{μs}\left({\color{gray}0.985 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}0.358 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.23 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}1.44 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.34 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}1.73 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.21 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}1.84 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$40.5 \mathrm{ms} \pm 165 \mathrm{μs}\left({\color{gray}1.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$77.3 \mathrm{ms} \pm 315 \mathrm{μs}\left({\color{gray}-3.706 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$45.3 \mathrm{ms} \pm 186 \mathrm{μs}\left({\color{gray}-0.871 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$46.9 \mathrm{ms} \pm 218 \mathrm{μs}\left({\color{gray}-2.361 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$57.3 \mathrm{ms} \pm 404 \mathrm{μs}\left({\color{gray}-0.190 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$42.6 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}0.209 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$423 \mathrm{ms} \pm 1.03 \mathrm{ms}\left({\color{gray}-1.050 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$91.9 \mathrm{ms} \pm 472 \mathrm{μs}\left({\color{lightgreen}-8.088 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$88.4 \mathrm{ms} \pm 409 \mathrm{μs}\left({\color{gray}0.677 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$284 \mathrm{ms} \pm 821 \mathrm{μs}\left({\color{gray}-2.418 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$15.3 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-2.655 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$15.3 \mathrm{ms} \pm 81.9 \mathrm{μs}\left({\color{gray}-2.807 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.5 \mathrm{ms} \pm 98.9 \mathrm{μs}\left({\color{gray}-4.692 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$15.2 \mathrm{ms} \pm 80.4 \mathrm{μs}\left({\color{lightgreen}-5.066 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.0 \mathrm{ms} \pm 95.4 \mathrm{μs}\left({\color{gray}-3.937 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.8 \mathrm{ms} \pm 66.5 \mathrm{μs}\left({\color{gray}-4.214 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$15.1 \mathrm{ms} \pm 80.9 \mathrm{μs}\left({\color{gray}-3.464 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.9 \mathrm{ms} \pm 81.6 \mathrm{μs}\left({\color{lightgreen}-5.512 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.5 \mathrm{ms} \pm 80.8 \mathrm{μs}\left({\color{lightgreen}-6.586 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.7 \mathrm{ms} \pm 159 \mathrm{μs}\left({\color{gray}-3.341 \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.5 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{lightgreen}-7.929 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.2 \mathrm{ms} \pm 313 \mathrm{μs}\left({\color{lightgreen}-6.795 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.2 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{lightgreen}-7.640 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$31.3 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{lightgreen}-5.484 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.3 \mathrm{ms} \pm 213 \mathrm{μs}\left({\color{lightgreen}-8.622 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.2 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{lightgreen}-8.961 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$31.2 \mathrm{ms} \pm 263 \mathrm{μs}\left({\color{gray}0.184 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$31.2 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-3.609 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$31.7 \mathrm{ms} \pm 243 \mathrm{μs}\left({\color{gray}-1.490 \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.27 \mathrm{ms} \pm 49.0 \mathrm{μs}\left({\color{gray}-2.873 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$90.5 \mathrm{ms} \pm 485 \mathrm{μs}\left({\color{gray}-3.271 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$140 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{gray}-4.803 \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.2 \mathrm{ms} \pm 423 \mathrm{μs}\left({\color{gray}-2.604 \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 490 \mathrm{μs}\left({\color{gray}-3.815 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$117 \mathrm{ms} \pm 519 \mathrm{μs}\left({\color{gray}-0.365 \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 572 \mathrm{μs}\left({\color{gray}-1.418 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$87.6 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}-2.441 \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 $$116 \mathrm{ms} \pm 487 \mathrm{μs}\left({\color{gray}-3.673 \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.5 \mathrm{ms} \pm 430 \mathrm{μs}\left({\color{gray}-3.870 \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 $$103 \mathrm{ms} \pm 488 \mathrm{μs}\left({\color{gray}-3.728 \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 $$105 \mathrm{ms} \pm 426 \mathrm{μs}\left({\color{gray}-3.593 \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 $$106 \mathrm{ms} \pm 555 \mathrm{μs}\left({\color{gray}-2.424 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$137 \mathrm{ms} \pm 604 \mathrm{μs}\left({\color{gray}0.551 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$138 \mathrm{ms} \pm 509 \mathrm{μs}\left({\color{gray}3.32 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$105 \mathrm{ms} \pm 649 \mathrm{μs}\left({\color{red}39.1 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$584 \mathrm{ms} \pm 3.05 \mathrm{ms}\left({\color{gray}0.373 \mathrm{\%}}\right) $$ Flame Graph

Base automatically changed from t/be-417-include-binary-and-unary-operation-support-inside-of-select to main February 25, 2026 14:32
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