apache / apache/datafusion

Handle DynamicFilters crossing BufferExec nodes

Open
#20,778 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

https://github.com/apache/datafusion/pull/19761 introduced buffering on the probe side of a HashJoinExec node as an optional feature for eagerly fetching the probe side.

While this demonstrates speed in benchmarks, it does not play well with dynamic filters, as the buffering behavior does not let the dynamic filter produce any meaningful filter, therefore, fetching more than whats necessary.

For this reason, hash join buffering on the probe side is an optional feature.

### Describe the solution you'd like

It would be nice to detect when a dynamic filter exists below the BufferExec node and either:
- disable the buffering behavior
- hold a reference to the dynamic filter and be smart about whether it's worth waiting for it or not

### Describe alternatives you've considered

Just leave the hash join buffering off by default forever

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading PR 19761 and the interaction between BufferExec, HashJoinExec, and dynamic filters. Determine whether buffering should be disabled or should wait based on the filter, then verify that buffering no longer causes dynamic filters to fetch more data than necessary.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.