Skip to content

feat(expr): add bound expressions - #9125

Draft
joseph-isaacs wants to merge 1 commit into
developfrom
ji/bound-expr-foundation
Draft

feat(expr): add bound expressions#9125
joseph-isaacs wants to merge 1 commit into
developfrom
ji/bound-expr-foundation

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduce Scope and a type-checked BoundExpression tree whose nodes retain their inferred dtypes.
  • Add fallible construction, child rebuilding, binding and unbinding, structural and exact-identity equality, iterative drop, and tree display support.
  • Keep Expression::return_dtype as a compatibility path backed by expression binding.

Why

Consumers that know the authoritative root dtype should be able to bind once and retain type information instead of recursively recomputing it throughout analysis and execution.

Impact

This is PR 1 of 2 in the stack. It adds the bound-expression representation and compatibility API without changing scan or layout interfaces.

Stack

  1. This PR: bound-expression foundation
  2. refactor: propagate bound expressions through layouts #9126: array execution and scan/layout propagation

Validation

  • cargo check -p vortex-array
  • cargo +nightly fmt --all -- --check
  • git diff --check

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.21053% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.36%. Comparing base (a6b4527) to head (bcb3aea).
⚠️ Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-array/src/expr/bound_expression.rs 80.47% 41 Missing ⚠️
vortex-array/src/expr/display.rs 97.43% 1 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 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

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 48.47%

❌ 4 regressed benchmarks
✅ 1838 untouched benchmarks
⏩ 55 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation pack_return_dtype[2000] 1.3 ms 2.5 ms -50.68%
Simulation pack_return_dtype[500] 318 µs 614.1 µs -48.22%
Simulation pack_return_dtype[1000] 633.8 µs 1,223.9 µs -48.21%
Simulation pack_return_dtype[100] 67.3 µs 126.3 µs -46.69%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ji/bound-expr-foundation (bcb3aea) with develop (a1c2853)

Open in CodSpeed

Footnotes

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

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

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant