Skip to content

Conversation

@discord9
Copy link
Contributor

@discord9 discord9 commented Dec 19, 2025

Which issue does this PR close?

Rationale for this change

For dynamic filter to work properly, table scan must get correct column even if it's passing through alias(by ProjectionExec) hence need to modify parent filter when gather_filters_for_pushdown

What changes are included in this PR?

as title, add support for handling simple alias in pushdown filter, which expand aliased column(in pushdown filter) to it's original expressions(or UnKnownColumn if can't found aliased column in pushdown filter) so alias in projection is supported, also added unit tests.
AI Content claim: the core logic is hand written and thoroughly understood, but unit test are largely generated with some human guidance

Are these changes tested?

Unit tests are added, please comment if more tests are needed

Are there any user-facing changes?

Yes, dynamic filter will work properly with alias now, I'm not sure if that count as breaking change though?

@github-actions github-actions bot added physical-plan Changes to the physical-plan crate physical-expr Changes to the physical-expr crates labels Dec 19, 2025
@discord9 discord9 changed the title feat: support alias on dynamic filter with ProjectionExec feat: support pushdown alias on simple dynamic filter with ProjectionExec Dec 25, 2025
@discord9 discord9 marked this pull request as ready for review December 25, 2025 12:38
@discord9 discord9 changed the title feat: support pushdown alias on simple dynamic filter with ProjectionExec feat: support pushdown alias on dynamic filter with ProjectionExec Dec 25, 2025
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Dec 26, 2025
@discord9
Copy link
Contributor Author

@jackkleeman @adriangb hi, I added the projection alias support in #17246, since you have the most context on this, could you please take a look when you have a chance?

@adriangb adriangb self-requested a review December 29, 2025 15:15
@discord9 discord9 force-pushed the feat/dyn_filter_alias branch from ee4e327 to 4775fc7 Compare December 30, 2025 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates 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.

Dynamic filter pushdown through projection should support aliases

1 participant