Skip to content

Conversation

@LiaCastaneda
Copy link
Contributor

@LiaCastaneda LiaCastaneda commented Jan 10, 2026

Which issue does this PR close?

Rationale for this change

The:is_used() API incorrectly returned false for custom DataSource implementations that didn't call reassign_expr_columns() -> with_new_children() . This caused HashJoinExec to skip computing dynamic filters even when they were actually being used.

What changes are included in this PR?

Updated is_used() to check both outer and inner Arc counts

Are these changes tested?

Functionality is covered by existing test test_hashjoin_dynamic_filter_pushdown_is_used. I was not sure if to add a repro since it would require adding a custom DataSource, the current tests in datafusion/core/tests/physical_optimizer/filter_pushdown/mod.rs use FileScanConfig

Are there any user-facing changes?

no

@github-actions github-actions bot added physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate labels Jan 10, 2026
@LiaCastaneda LiaCastaneda marked this pull request as ready for review January 10, 2026 18:13
@tobixdev
Copy link
Contributor

Thanks for the quick fix!

To me this approach seems great. Fixes the problem and does not make it more complex for users.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic Filter marked as not used

3 participants