Skip to content

perf: embed projections in ASOF joins - #24873

Draft
Xuanwo wants to merge 1 commit into
apache:mainfrom
Xuanwo:xuanwo/asof-projection-embedding
Draft

perf: embed projections in ASOF joins#24873
Xuanwo wants to merge 1 commit into
apache:mainfrom
Xuanwo:xuanwo/asof-projection-embedding

Conversation

@Xuanwo

Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

AsOfJoinExec already supports an internal output projection, but physical projection pushdown cannot currently populate it. Queries that need only a subset of ASOF output columns therefore retain a separate ProjectionExec and materialize unused join columns.

What changes are included in this PR?

  • Implement the physical projection-embedding hook for AsOfJoinExec.
  • Preserve empty-projection row counts and decline unsafe repeated embedding.
  • Add focused execution coverage for projected, empty, and already-projected plans.

Are these changes tested?

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p datafusion-physical-plan joins::asof_join::tests --all-features
  • Extended workspace tests from the contributor guide

Are there any user-facing changes?

No SQL or logical API changes. Physical plans may avoid materializing ASOF output columns that are not required downstream.

@github-actionsgithub-actionsBot added the physical-plan Changes to the physical-plan crate label Sep 2, 2026
@XuanwoXuanwo mentioned this pull request Sep 2, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.65979% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.62%. Comparing base (3a4c310) to head (63d9434).

Files with missing linesPatch %Lines
datafusion/physical-plan/src/joins/asof_join.rs88.65%2 Missing and 9 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #24873 +/- ##
=======================================
Coverage 81.62% 81.62% =======================================
Files 1123 1123 Lines 409637 409734 +97 Branches 409637 409734 +97 =======================================
+ Hits 334383 334465 +82 - Misses 55624 55629 +5 - Partials 19630 19640 +10 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-planChanges to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Xuanwo@codecov-commenter