Skip to content

Fast pushdown projection - #95

Merged
robinskil merged 1 commit into
mainfrom
features/fast-pushdown-projection
Sep 22, 2025
Merged

robinskil merged 1 commit into
mainfrom
features/fast-pushdown-projection

Conversation

@robinskil

Copy link
Copy Markdown
Collaborator

Enable the fast pushdown of selected columns when using the JSON API. This can provide big performance improvements. Its is feature blocked by the flag BEACON_ENABLE_PUSHDOWN_PROJECTION

@robinskil robinskil self-assigned this Sep 22, 2025
Copilot AI review requested due to automatic review settings September 22, 2025 21:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements fast pushdown projection to improve query performance by filtering columns early in the query processing pipeline. The feature is controlled by the BEACON_ENABLE_PUSHDOWN_PROJECTION configuration flag.

  • Adds column collection logic to gather selected columns from query SELECT clauses
  • Implements pushdown projection by filtering schemas to only include requested columns
  • Adds configuration flag to enable/disable the feature

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
beacon-config/src/lib.rs Adds configuration flag for enabling pushdown projection
beacon-query/src/lib.rs Implements column collection method for Select enum
beacon-query/src/parser.rs Adds conditional logic to collect columns and pass them for projection
beacon-query/src/from.rs Updates table initialization to support projection parameter
beacon-data-lake/src/files/collection.rs Implements schema filtering for pushdown projection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +63 to +66
let maybe_set_projection: HashSet<String> = HashSet::from_iter(projection.iter().cloned());

if !maybe_set_projection.is_empty() {
// Only keep fields that are in the projection

Copilot AI Sep 22, 2025

Copy link

Choose a reason for hiding this comment

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

The HashSet maybe_set_projection is created but then immediately checked for emptiness, while the original projection Vec is used for filtering. This creates unnecessary overhead - you can check projection.is_empty() directly and use the Vec for filtering without creating the HashSet.

Suggested change
let maybe_set_projection: HashSet<String> = HashSet::from_iter(projection.iter().cloned());
if !maybe_set_projection.is_empty() {
// Only keep fields that are in the projection
// Only keep fields that are in the projection if projection is not empty
if !projection.is_empty() {

Copilot uses AI. Check for mistakes.
@robinskil
robinskil merged commit 472ab7a into main Sep 22, 2025
1 check passed
robinskil added a commit that referenced this pull request Oct 13, 2025
@robinskil
robinskil deleted the features/fast-pushdown-projection branch October 22, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants