Skip to content

feat: support common table expressions - #379

Merged
KKould merged 4 commits into
mainfrom
feat/recursive-cte
Aug 9, 2026
Merged

feat: support common table expressions#379
KKould merged 4 commits into
mainfrom
feat/recursive-cte

Conversation

@KKould

@KKould KKould commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • add non-recursive CTE binding with nested scope handling
  • add spill-backed WITH RECURSIVE ... UNION ALL execution
  • reuse the recursive execution arena between generations
  • integrate recursive operators with planning, optimization, and EXPLAIN
  • add SQLLogicTest and executor-level spill/generation coverage

Validation

  • cargo fmt --all -- --check
  • cargo test --lib --features spill,decimal iteration_reads_only_the_previous_spilled_generation
  • cargo clippy --features spill --lib
  • make test-slt SQLLOGIC_PATH=tests/slt/cte.slt

@KKould KKould self-assigned this Aug 8, 2026
@KKould KKould added the enhancement New feature or request label Aug 8, 2026
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.33943% with 22 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@bccf67f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/binder/parser.rs 96.07% 6 Missing ⚠️
src/execution/dql/recursive_cte.rs 97.40% 6 Missing ⚠️
src/execution/spill/mod.rs 78.57% 6 Missing ⚠️
src/planner/operator/recursive_cte.rs 87.50% 2 Missing ⚠️
src/binder/select.rs 94.73% 1 Missing ⚠️
src/optimizer/rule/normalization/column_pruning.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #379   +/-   ##
=======================================
  Coverage        ?   92.95%           
=======================================
  Files           ?      255           
  Lines           ?    43770           
  Branches        ?        0           
=======================================
  Hits            ?    40687           
  Misses          ?     3083           
  Partials        ?        0           
Flag Coverage Δ
rust 92.95% <96.33%> (?)

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

Files with missing lines Coverage Δ
src/binder/expr.rs 94.26% <100.00%> (ø)
src/binder/mod.rs 86.69% <100.00%> (ø)
src/execution/dql/mod.rs 100.00% <ø> (ø)
src/execution/mod.rs 95.12% <100.00%> (ø)
src/optimizer/rule/implementation/mod.rs 92.49% <100.00%> (ø)
...mizer/rule/normalization/compilation_in_advance.rs 96.00% <100.00%> (ø)
src/optimizer/rule/normalization/mod.rs 83.67% <100.00%> (ø)
src/planner/arena.rs 99.69% <100.00%> (ø)
src/planner/mod.rs 93.75% <100.00%> (ø)
src/planner/operator/mod.rs 96.40% <100.00%> (ø)
... and 8 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KKould
KKould force-pushed the feat/recursive-cte branch from 799dbc1 to e7e0d8e Compare August 9, 2026 12:47
@KKould
KKould merged commit 8028dc6 into main Aug 9, 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