Skip to content

Add Distribution::HashPartitioned to Distribution::KeyPartitioned API bridge - #23259

Merged
gabotechs merged 1 commit into
apache:mainfrom
gene-bordegaray:gene.bordegaray/2026/06/key-partitioned-api-bridge
Jul 1, 2026
Merged

Add Distribution::HashPartitioned to Distribution::KeyPartitioned API bridge#23259
gabotechs merged 1 commit into
apache:mainfrom
gene-bordegaray:gene.bordegaray/2026/06/key-partitioned-api-bridge

Conversation

@gene-bordegaray

@gene-bordegaraygene-bordegaray commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

HashPartitioned is historical naming for a key-partitioning requirement. This keeps the old variant as a deprecated compatibility bridge while moving DataFusion internals to KeyPartitioned.

What changes are included in this PR?

Adds KeyPartitioned, deprecates HashPartitioned, and treats both equivalently during the transition to avoid breaking changes for downstream consumers. A blast radius report on this was done here #23241

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes, Distribution::HashPartitioned is deprecated and trainsitioned to Distribution::KeyPartitioned.

@github-actionsgithub-actionsBot added physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate physical-plan Changes to the physical-plan crate labels Jun 30, 2026
@gene-bordegaraygene-bordegaray changed the title Add KeyPartitioned distribution bridgeAdd Distribution::HashPartitioned to Distribution::KeyPartitioned API bridgeJun 30, 2026
@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown

Thank you for opening this pull request!

Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).

Details
 Cloning apache/main
Building datafusion v54.0.0 (current)
Built [ 101.728s] (current)
Parsing datafusion v54.0.0 (current)
Parsed [ 0.034s] (current)
Building datafusion v54.0.0 (baseline)
Built [ 100.916s] (baseline)
Parsing datafusion v54.0.0 (baseline)
Parsed [ 0.036s] (baseline)
Checking datafusion v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.586s] 223 checks: 223 pass, 30 skip
Summary no semver update required
Finished [ 205.055s] datafusion
Building datafusion-physical-expr v54.0.0 (current)
Built [ 28.393s] (current)
Parsing datafusion-physical-expr v54.0.0 (current)
Parsed [ 0.045s] (current)
Building datafusion-physical-expr v54.0.0 (baseline)
Built [ 28.732s] (baseline)
Parsing datafusion-physical-expr v54.0.0 (baseline)
Parsed [ 0.049s] (baseline)
Checking datafusion-physical-expr v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.384s] 223 checks: 221 pass, 2 fail, 0 warn, 30 skip
--- failure enum_variant_added: enum variant added on exhaustive enum ---
Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_variant_added.ron
Failed in:
variant Distribution:KeyPartitioned in /home/runner/work/datafusion/datafusion/datafusion/physical-expr/src/partitioning.rs:609
--- failure enum_variant_marked_deprecated: enum variant #[deprecated] added ---
Description:
An enum variant is now #[deprecated]. Downstream crates will get a compiler warning when using this variant.
ref: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-deprecated-attribute
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_variant_marked_deprecated.ron
Failed in:
variant datafusion_physical_expr::Distribution::HashPartitioned in /home/runner/work/datafusion/datafusion/datafusion/physical-expr/src/partitioning.rs:606
Summary semver requires new major version: 1 major and 1 minor checks failed
Finished [ 59.090s] datafusion-physical-expr
Building datafusion-physical-optimizer v54.0.0 (current)
Built [ 38.748s] (current)
Parsing datafusion-physical-optimizer v54.0.0 (current)
Parsed [ 0.022s] (current)
Building datafusion-physical-optimizer v54.0.0 (baseline)
Built [ 38.718s] (baseline)
Parsing datafusion-physical-optimizer v54.0.0 (baseline)
Parsed [ 0.022s] (baseline)
Checking datafusion-physical-optimizer v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.128s] 223 checks: 223 pass, 30 skip
Summary no semver update required
Finished [ 78.848s] datafusion-physical-optimizer
Building datafusion-physical-plan v54.0.0 (current)
Built [ 36.607s] (current)
Parsing datafusion-physical-plan v54.0.0 (current)
Parsed [ 0.132s] (current)
Building datafusion-physical-plan v54.0.0 (baseline)
Built [ 36.406s] (baseline)
Parsing datafusion-physical-plan v54.0.0 (baseline)
Parsed [ 0.131s] (baseline)
Checking datafusion-physical-plan v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 0.574s] 223 checks: 223 pass, 30 skip
Summary no semver update required
Finished [ 75.144s] datafusion-physical-plan

@github-actionsgithub-actionsBot added the auto detected api change Auto detected API change label Jun 30, 2026
@gene-bordegaray
gene-bordegarayforce-pushed the gene.bordegaray/2026/06/key-partitioned-api-bridge branch from 15c8c67 to a7a0d37CompareJune 30, 2026 14:01
Comment threaddatafusion/physical-expr/src/partitioning.rs

@gabotechsgabotechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 Nice!

Comment threaddatafusion/physical-expr/src/partitioning.rs Outdated
Comment threaddatafusion/physical-expr/src/partitioning.rs

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment threaddatafusion/physical-expr/src/partitioning.rs Outdated
Comment threaddatafusion/physical-expr/src/partitioning.rs
Comment threaddatafusion/physical-expr/src/partitioning.rs
@gene-bordegaray
gene-bordegarayforce-pushed the gene.bordegaray/2026/06/key-partitioned-api-bridge branch from a7a0d37 to 858990aCompareJune 30, 2026 18:10
@gene-bordegaray

Copy link
Copy Markdown
ContributorAuthor

adresse comments thanks 👍

@gabotechs

Copy link
Copy Markdown
Contributor

Nice, thanks @gene-bordegaray and @alamb!

@gabotechs
gabotechs added this pull request to the merge queueJul 1, 2026
Merged via the queue into apache:main with commit 15d676aJul 1, 2026
38 checks passed
gene-bordegaray added a commit to gene-bordegaray/datafusion that referenced this pull request Jul 24, 2026
… API bridge (apache#23259)
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link to an issue to this PR using the GitHub syntax. For example
`Closesapache#123` indicates that this PR will close issue apache#123.
-->
- Closesapache#23236.
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
`HashPartitioned` is historical naming for a key-partitioning
requirement. This keeps the old variant as a deprecated compatibility
bridge while moving DataFusion internals to `KeyPartitioned`.
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
Adds `KeyPartitioned`, deprecates `HashPartitioned`, and treats both
equivalently during the transition to avoid breaking changes for
downstream consumers. A blast radius report on this was done here apache#23241
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
Yes.
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
Yes, `Distribution::HashPartitioned` is deprecated and trainsitioned to
`Distribution::KeyPartitioned`.
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
gene-bordegaray added a commit to DataDog/datafusion that referenced this pull request Aug 7, 2026
… API bridge (apache#23259)
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link to an issue to this PR using the GitHub syntax. For example
`Closes#123` indicates that this PR will close issue #123.
-->
- Closesapache#23236.
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
`HashPartitioned` is historical naming for a key-partitioning
requirement. This keeps the old variant as a deprecated compatibility
bridge while moving DataFusion internals to `KeyPartitioned`.
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
Adds `KeyPartitioned`, deprecates `HashPartitioned`, and treats both
equivalently during the transition to avoid breaking changes for
downstream consumers. A blast radius report on this was done here apache#23241
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
Yes.
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
Yes, `Distribution::HashPartitioned` is deprecated and trainsitioned to
`Distribution::KeyPartitioned`.
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto detected api changeAuto detected API changecoreCore DataFusion crateoptimizerOptimizer rulesphysical-exprChanges to the physical-expr cratesphysical-planChanges to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace / rename HashPartitioned distribution as KeyPartitioned

3 participants

@gene-bordegaray@gabotechs@alamb