Skip to content

chore: Add config flag for remote dynamic filters usage - #754

Merged
jayshrivastava merged 2 commits into
datafusion-contrib:mainfrom
paradedb:barbarj.dynamic-filters-flag
Sep 26, 2026
Merged

jayshrivastava merged 2 commits into
datafusion-contrib:mainfrom
paradedb:barbarj.dynamic-filters-flag

Conversation

@barbarj

@barbarj barbarj commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What

As a follow up to this comment, this PR adds a config flag to enable/disable the use of remote dynamic filters.

It updates src/dynamic_filtering/mod.rs's helpers with the distinction between local and remote dynamic filters, and gates the remote-only behavior around calls to orphan_dynamic_filter_consumers and when registering remote dynamic filter producer IDs and when registering tasks with the dynamic filter registry.

Testing

Adds unit and snapshot tests showing the effects of disabling this flag.

@barbarj

barbarj commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@jayshrivastava Here you go!

@jayshrivastava jayshrivastava left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

assert_eq!(display_plan_ascii(plan.as_ref(), false), original_display);

if expect_dynamic_filter_updates {
if let Some(expect_updates) = expect_dynamic_filter_updates {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll leave a note to remove this in #639, after all remote dynamic filtering is working. For now, it makes sense because there's no other way to really assert this.

After that's merged, we will get this information from the plan snapshots. The snapshots will show if consumers got updates or not.

@jayshrivastava
jayshrivastava merged commit 2ea6af1 into datafusion-contrib:main Sep 26, 2026
35 checks passed
Comment thread src/distributed_ext.rs

/// Enables or disables the use of distributed dynamic filters across network boundaries. This
/// does not affect dynamic filter pushdown intra-stage.
fn with_distributed_dynamic_filters_used(self, enabled: bool) -> Result<Self, DataFusionError>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The convention is to name these after the the DistributedConfig property it's controlling.

As this is controlling remote_dynamic_filters this should be called:

  • with_distributed_remote_dynamic_filters
  • set_distributed_remote_dynamic_filters

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fixed by #755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants