Skip to content

Top-down scalar compiler refactor#247

Merged
carli2 merged 4 commits intomasterfrom
codex/topdown-fresh
Apr 19, 2026
Merged

Top-down scalar compiler refactor#247
carli2 merged 4 commits intomasterfrom
codex/topdown-fresh

Conversation

@carli2
Copy link
Copy Markdown
Contributor

@carli2 carli2 commented Apr 19, 2026

What

  • refactor scalar subquery compile phases to avoid repeated broad raw-AST analysis
  • share logical scalar subquery scope preparation between inline and unnest paths
  • keep dependent-scalar handling compile-only in fields

Why

  • move queryplan compilation closer to the top-down unnesting model from the Neumann paper
  • cut compile-time overhead on the real badge/dashboard query without introducing runtime structures

Validation

  • python3 run_sql_tests.py tests/32_expr_subselects.yaml
  • python3 run_sql_tests.py tests/117_dashboard_unnesting_regressions.yaml
  • cold benchmark on the real badge query improved from ~23.69s on master to ~4.5s in this branch

@carli2 carli2 merged commit a02a467 into master Apr 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant