Skip to content

Conversation

@xudong963
Copy link
Member

Which issue does this PR close?

  • Closes #.

Rationale for this change

I found CoalescePartitionsExec doesn't implement gather_filters_for_pushdown, which means it'll block dynamic filter pushdown. I don't find a reason to forbid it. (Correct me if I misunderstood)

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@xudong963 xudong963 requested a review from adriangb October 14, 2025 04:48
@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Oct 14, 2025
Copy link
Contributor

@adriangb adriangb left a comment

Choose a reason for hiding this comment

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

Could you add a test (via SLT or unit) that shows that a plan with a CoalesceBatchesExec can support dynamic filter pushdown?

@xudong963
Copy link
Member Author

Could you add a test (via SLT or unit) that shows that a plan with a CoalesceBatchesExec can support dynamic filter pushdown?

Sure

@github-actions github-actions bot added the core Core DataFusion crate label Oct 14, 2025
Ok:
- SortExec: TopK(fetch=1), expr=[b@1 DESC NULLS LAST], preserve_partitioning=[false]
- CoalesceBatchesExec: target_batch_size=1024
- DataSourceExec: file_groups={1 group: [[test.parquet]]}, projection=[a, b, c], file_type=test, pushdown_supported=true, predicate=DynamicFilter [ empty ]
Copy link
Member Author

@xudong963 xudong963 Oct 14, 2025

Choose a reason for hiding this comment

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

I added a test for CoalesceBatchesExec meanwhile

The key change: predicate=DynamicFilter [ empty ]

Ok:
- SortExec: TopK(fetch=1), expr=[b@1 DESC NULLS LAST], preserve_partitioning=[false]
- CoalescePartitionsExec
- DataSourceExec: file_groups={2 groups: [[test1.parquet], [test2.parquet]]}, projection=[a, b, c], file_type=test, pushdown_supported=true, predicate=DynamicFilter [ empty ]
Copy link
Member Author

Choose a reason for hiding this comment

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

The key change: predicate=DynamicFilter [ empty ]

@xudong963 xudong963 added this pull request to the merge queue Oct 14, 2025
Merged via the queue into apache:main with commit 28290ba Oct 14, 2025
28 checks passed
xudong963 added a commit to massive-com/arrow-datafusion that referenced this pull request Oct 14, 2025
…he#18046)

* Impl gather_filters_for_pushdown for CoalescePartitionsExec

* add tests
tobixdev pushed a commit to tobixdev/datafusion that referenced this pull request Nov 2, 2025
…he#18046)

* Impl gather_filters_for_pushdown for CoalescePartitionsExec

* add tests
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants