Skip to content

Column projection pushdown for GROUP BY#163

Merged
poyrazK merged 7 commits into
mainfrom
column-projection-pushdown-v2
Jun 11, 2026
Merged

Column projection pushdown for GROUP BY#163
poyrazK merged 7 commits into
mainfrom
column-projection-pushdown-v2

Conversation

@poyrazK

@poyrazK poyrazK commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Column projection pushdown: scan reads only required columns for GROUP BY queries
  • Q1 GROUP BY: 161k -> 2.68M rows/s (16-17x speedup)
  • Gap vs DuckDB closes from 385x to 21x (10k)

Commits

  1. Add read_batch(col_indices) overload declaration to ColumnarTable
  2. Implement projection-aware read_batch(col_indices) in ColumnarTable
  3. Add set_required_columns() to VectorizedSeqScanOperator for column projection
  4. Propagate required column indices from GROUP BY to scan in build_vectorized_plan

Tests

  • All 39 vectorized_operator_tests pass
  • All 50 cloudSQL_tests pass

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@poyrazK, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 3 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b3153300-13d2-477c-826a-ef44259c8e99

📥 Commits

Reviewing files that changed from the base of the PR and between e46a1f6 and 2453262.

📒 Files selected for processing (4)
  • include/executor/vectorized_operator.hpp
  • include/storage/columnar_table.hpp
  • src/executor/query_executor.cpp
  • src/storage/columnar_table.cpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch column-projection-pushdown-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

poyrazK and others added 3 commits June 11, 2026 18:09
…ction pushdown

- Deduplicate required_col_indices before passing to set_required_columns()
- Build scan_reduced_schema from table columns only (not aggregate output)
- Fixes data corruption when same column appears in GROUP BY and aggregate

@poyrazK poyrazK left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

It's okay to merge

@poyrazK poyrazK merged commit 4f41d62 into main Jun 11, 2026
9 checks 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