Skip to content

feat: impl Any for MemoryPool#21803

Open
haohuaijin wants to merge 8 commits intoapache:mainfrom
haohuaijin:memory-any
Open

feat: impl Any for MemoryPool#21803
haohuaijin wants to merge 8 commits intoapache:mainfrom
haohuaijin:memory-any

Conversation

@haohuaijin
Copy link
Copy Markdown
Contributor

@haohuaijin haohuaijin commented Apr 23, 2026

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

implment Any for MemoryPool

Are these changes tested?

yes, add one test case

Are there any user-facing changes?

@github-actions github-actions Bot added the execution Related to the execution crate label Apr 23, 2026
/// * [`TrackConsumersPool`]: Wraps another [`MemoryPool`] and tracks consumers,
/// providing better error messages on the largest memory users.
pub trait MemoryPool: Send + Sync + std::fmt::Debug + Display {
pub trait MemoryPool: Any + Send + Sync + std::fmt::Debug + Display {
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.

Adding Any as a supertrait adds a 'static requirement to every MemoryPool implementor. This might break downstream if they have implemented custom pools which borrowed state or lifetime parameters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thank you for mention this, i add upgrade guide in 344b52f

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 24, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

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-execution v53.1.0 (current)
       Built [  30.334s] (current)
     Parsing datafusion-execution v53.1.0 (current)
      Parsed [   0.027s] (current)
    Building datafusion-execution v53.1.0 (baseline)
       Built [  30.003s] (baseline)
     Parsing datafusion-execution v53.1.0 (baseline)
      Parsed [   0.027s] (baseline)
    Checking datafusion-execution v53.1.0 -> v53.1.0 (no change; assume patch)
     Checked [   0.313s] 222 checks: 221 pass, 1 fail, 0 warn, 30 skip

--- failure trait_added_supertrait: non-sealed trait added new supertraits ---

Description:
A non-sealed trait added one or more supertraits, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#generic-bounds-tighten
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/trait_added_supertrait.ron

Failed in:
  trait datafusion_execution::memory_pool::MemoryPool gained Any in file /home/runner/work/datafusion/datafusion/datafusion/execution/src/memory_pool/mod.rs:186

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  62.535s] datafusion-execution

@github-actions github-actions Bot added the auto detected api change Auto detected API change label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto detected api change Auto detected API change documentation Improvements or additions to documentation execution Related to the execution crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

impl Any for MemoryPool

3 participants