Skip to content

Conversation

@askalt
Copy link
Contributor

@askalt askalt commented Feb 10, 2026

Which issue does this PR close?

Closes #20270

Prior the patch HashJoinExecBuilder constructed from an existing node reseted some fields of the node, e.g. dynamic filters, metrics. It significantly reduces usage scope of the builder.

What changes are included in this PR?

This patch improves the implementation. Now builder created from the existing node preserves all fields in case they have not been explicitly updated. Also builder now tracks flag if it must recompute plan properties.

@github-actions github-actions bot added optimizer Optimizer rules physical-plan Changes to the physical-plan crate labels Feb 10, 2026
Prior the patch HashJoinExecBuilder constructed from an existing node
reseted some fields of the node, e.g. dynamic filters, metrics. It
significantly reduces usage scope of the builder.

This patch improves the implementation. Now builder created from the
existing node preserves all fields in case they have not been explicitly
updated. Also builder now tracks flag if it must recompute plan properties.

Closes apache#20270
@askalt askalt force-pushed the askalt/improve-hash-join-exec-builder branch from fbc498f to dcc9cfa Compare February 10, 2026 18:50
Copy link
Contributor

@jonathanc-n jonathanc-n left a comment

Choose a reason for hiding this comment

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

I left a comment, but this is a nicely designed. Thanks!

}

/// Helps to build [`HashJoinExec`].
///
Copy link
Contributor

Choose a reason for hiding this comment

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

We are refactoring this to make it easier for the person who is going to use it throughout the codebase and make better decisions like adding new fields.

I think the documentation should be geared more to how someone should add a new field. So explicitly adding something like, "if a field is changed + it is used to compute properties, preserve_properties should be set to false during reassignment"

}

/// Reset node state.
pub fn reset_state(mut self) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be mentioned in the HashExecBuilder docs that this is used to reset runtime features.

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

Labels

optimizer Optimizer rules physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add doc for HashJoinExecBuilder

2 participants