Skip to content

Reduce executor allocations and fix scalar/outer-join correctness - #385

Merged
KKould merged 2 commits into
mainfrom
perf/executor-allocation-reduction
Oct 3, 2026
Merged

KKould merged 2 commits into
mainfrom
perf/executor-allocation-reduction

Conversation

@KKould

@KKould KKould commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fix scalar cardinality validation, hash outer-join match tracking, and TopK ordering.
  • Reduce unnecessary tuple copies and allocations; preallocate executor nodes and reuse CSV/TopK buffers.
  • TupleBuilder::build_with_row now fills a caller-owned Tuple.

Tests

  • Workspace tests with spill; lib tests with copy,lmdb,decimal,spill.
  • All 196 SQLLogicTest files; formatting and diff checks.

Performance gains have not been benchmarked.

KKould added 2 commits October 4, 2026 07:33
Validate scalar results before caching, track outer join matches per build row, and use a consistent TopK tie-break ordering. Add regressions to existing SLT suites.
@KKould KKould self-assigned this Oct 3, 2026
@KKould KKould added the enhancement New feature or request label Oct 3, 2026
@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.94459% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.30%. Comparing base (d980efa) to head (4dcd111).

Files with missing lines Patch % Lines
src/execution/dql/scalar_apply.rs 92.10% 3 Missing ⚠️
src/execution/dql/join/nested_loop_join.rs 97.91% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   93.26%   93.30%   +0.03%     
==========================================
  Files         259      259              
  Lines       47741    47765      +24     
==========================================
+ Hits        44524    44565      +41     
+ Misses       3217     3200      -17     
Flag Coverage Δ
rust 93.30% <98.94%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/catalog/table.rs 98.79% <100.00%> (+0.01%) ⬆️
src/db.rs 92.04% <100.00%> (ø)
src/db/prepared.rs 94.55% <100.00%> (ø)
src/execution/ddl/add_column.rs 96.93% <100.00%> (-0.04%) ⬇️
src/execution/ddl/change_column.rs 97.08% <100.00%> (ø)
src/execution/ddl/create_index.rs 91.25% <100.00%> (+0.22%) ⬆️
src/execution/dml/analyze.rs 98.00% <100.00%> (-0.01%) ⬇️
src/execution/dml/copy_from_file.rs 97.50% <100.00%> (+0.02%) ⬆️
src/execution/dml/copy_to_file.rs 99.09% <100.00%> (+0.80%) ⬆️
src/execution/dml/delete.rs 100.00% <100.00%> (ø)
... and 22 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KKould
KKould merged commit 65d9638 into main Oct 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant