chore: Deprecate internal-only APIs in AggregateExec - #25257
2010YOUY01 wants to merge 1 commit into
Conversation
|
Not sure if there are better approaches for this case, it we have to do this way, we can later doc this pattern in |
|
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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25257 +/- ##
==========================================
- Coverage 81.88% 81.88% -0.01%
==========================================
Files 1133 1133
Lines 424522 424522
Branches 424522 424522
==========================================
- Hits 347622 347615 -7
- Misses 56288 56291 +3
- Partials 20612 20616 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| /// Clone this exec, overriding only the limit hint. | ||
| /// |
There was a problem hiding this comment.
This file has the only change (deprecation)
Other diff are all mechanical changes like #expect(deprecated) at call sites.
Building and rewriting an `AggregateExec` is how DataFusion's own physical optimizer rules work, not something external consumers should reach for. Hide that whole surface from the rendered docs, as apache#25257 does for the methods it deprecates: - the deprecated `with_limit_options`, `with_new_limit_options` and `with_new_aggr_exprs` - their replacements, `AggregateExec::builder`, `AggregateExec::to_builder` and `AggregateExecBuilder` itself - the `limit_options` getter `limit_options` is hidden but deliberately not deprecated: it has no replacement, reading the limit of an aggregate is safe, and deprecating it would only force `#[expect(deprecated)]` back into the optimizer rule that copies a limit between aggregates. Doc links from the still-public `AggregateExec::try_new` and `LimitOptions` into the hidden items are now plain code spans, since a link to a hidden item renders as a dead anchor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PwTc51ca2XHDCyVB7MbJoz
Which issue does this PR close?
Rationale for this change
AggregateExec::{with_new_limit_options, with_limit_options, limit_options}set a limit hint on an aggregation. This is part of the public API forAggregateExecIt's nearly impossible to use it correctly (see below code explanation) if we see it as a public
ExecutionPlanAPI, however it requirespubbecause physical optimizer requires it.This PR does:
#[doc(hidden)]. That is the usual Rust convention for "public for technical reasons, not for external user": the item is dropped from generated docs (docs.rs)What changes are included in this PR?
What is the testing strategy for this PR?
Are there any user-facing changes?
Yes, deprecations.