You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deprecate: mark Statistics V2 framework (PR #14699) as deprecated (#22071)
## Which issue does this PR close?
- Closes to #14896
- Related to #21120
## Rationale for this change
I think the fact that we have 2 sets of statics functions is confusing.
I think we should mark the copy that is not used as deprecated.
A bit over a year ago, thanks to @Fly-Style and @ozankabak, DataFusion
we merged a PR with a "V2" statistics framework
- #14699
The work to migrate the code to use this new framework is tracked in a
follow on ticket
- #14896
Sadly, no progress seems to have been made in this migration in over a
year.
PR #14699 was merged on 2025-02-24, ~15 months ago. Since then, the only
commits touching `datafusion/expr-common/src/statistics.rs` and
`datafusion/physical-expr/src/statistics/` have been mechanical — no
operator or planner has been taught to call `evaluate_statistics` /
`propagate_statistics` or construct a `Distribution` outside of the
framework's own tests.
In practice it has never been wired into the optimizer or any execution
operator.
Recently, thanks to @asolimando we have been starting down a different
path of a more extensible system:
- #21120
That issue explicitly describes the V2 distribution-based API as
"significantly more complex to implement and adopt" and proposes that
distribution-based estimation, if useful, be plugged in later as a
custom analyzer rather than as a `PhysicalExpr` trait surface.
Rather than continue carrying an unused public framework that we don't
intend to build on, let's deprecate it so downstream users aren't
confused
## What changes are included in this PR?
This PR adds `#[deprecated(since = "54.0.0", ...)]` attributes to the
public abstractions introduced in #1469
There is no behavior changes; the V2 code paths still compile and run,
so any
out-of-tree consumer that has already adopted them sees a deprecation
warning rather than a breakage.
## Are these changes tested?
No new tests; the existing tests for the deprecated items continue to
pass.
## Are there any user-facing changes?
The public API items listed above are now marked `#[deprecated]`.
Downstream code that uses them will see a compiler warning pointing to
#21120, but will continue to compile and run unchanged. The deprecated
items will be removed in a future release.
Partly generated 🤖 Generated with [Claude
Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments