Skip to content

Support pushing down empty projections into joins#20191

Merged
alamb merged 2 commits intoapache:mainfrom
restatedev:empty-projection-pushdown
Feb 12, 2026
Merged

Support pushing down empty projections into joins#20191
alamb merged 2 commits intoapache:mainfrom
restatedev:empty-projection-pushdown

Conversation

@jackkleeman
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

We should push down empty projections into HashJoinExec

What changes are included in this PR?

  1. try_embed_projection should embed empty projections
  2. build_batch_empty_build_side should support empty schemas

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate physical-plan Changes to the physical-plan crate labels Feb 6, 2026
@jackkleeman jackkleeman force-pushed the empty-projection-pushdown branch from 261c92b to dc95119 Compare February 6, 2026 16:48
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Feb 6, 2026
Copy link
Contributor

@kosiew kosiew left a comment

Choose a reason for hiding this comment

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

@jackkleeman

Thanks for working on this.

Left some comments.

@jackkleeman jackkleeman requested a review from kosiew February 11, 2026 10:37
Copy link
Contributor

@kosiew kosiew left a comment

Choose a reason for hiding this comment

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

LGTM

@jackkleeman jackkleeman force-pushed the empty-projection-pushdown branch from a59eed0 to de897ca Compare February 12, 2026 08:43
@jackkleeman jackkleeman force-pushed the empty-projection-pushdown branch from de897ca to 95affa3 Compare February 12, 2026 08:46
@alamb
Copy link
Contributor

alamb commented Feb 12, 2026

Thanks @jackkleeman and @kosiew 🚀

@alamb alamb added this pull request to the merge queue Feb 12, 2026
Merged via the queue into apache:main with commit af5f470 Feb 12, 2026
32 checks passed
@jackkleeman jackkleeman deleted the empty-projection-pushdown branch February 12, 2026 22:33
jackkleeman added a commit to restatedev/datafusion that referenced this pull request Feb 17, 2026
- Closes apache#20190.

We should push down empty projections into HashJoinExec

1. try_embed_projection should embed empty projections
2. build_batch_empty_build_side should support empty schemas

Yes

No
jackkleeman added a commit to restatedev/datafusion that referenced this pull request Feb 17, 2026
- Closes apache#20190.

We should push down empty projections into HashJoinExec

1. try_embed_projection should embed empty projections
2. build_batch_empty_build_side should support empty schemas

Yes

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

Labels

core Core DataFusion crate physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty ProjectionExec is not embedded into HashJoinExec by projection pushdown

3 participants