Skip to content

Ensure dynamic filter expr is built before fetching probe batch in HashJoin #17451

@rkrishn7

Description

@rkrishn7

Describe the bug

Presently, partition bounds are reported after the build side is collected during a hash join. However, there is no synchronization to wait until all bounds have been reported before we begin polling the right side.

This is so we can ensure that upstream APIs like FileOpener::open can immediately observe the updated dynamic filter as they may begin using it right away.

Without some synchronization, the behavior is racy and it's not guaranteed that that the dynamic filter is built prior to initiating the right side's execution plan.

To Reproduce

Reproducing is flaky given that the behavior is not determinate. I've been able to observe the placeholder dynamic filter expr (lit(true)) from time to time by adding a log to TestOpener::open in core::tests::physical_optimizer::filter_pushdown::utils.

Expected behavior

The updated dynamic filter should be immediately visible on the probe side.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions