Skip to content

Conversation

@JoshElkind
Copy link

Which issue does this PR close?

Closes #17083

Rationale for this change:

Standardizes the use of Arc::clone(&ptr) over ptr.clone() across the workspace to make reference counting increments explicit and distinguishable from deep copies. This improves code readability and maintainability.

What changes are included in this PR?

  • Added clippy::clone_on_ref_ptr = "deny" to workspace lints in root Cargo.toml.
  • Enabled lint inheritance in all sub-crates by adding [lints] workspace = true.
  • Removed redundant manual #![deny(clippy::clone_on_ref_ptr)] attributes from source files.
  • Refactored .clone() calls on Arc and Weak pointers to Arc::clone() / Weak::clone() across the workspace.
  • Fixed trait object coercion and missing imports (std::sync::Arc) resulting from the refactoring.

Are these changes tested?

Yes. Verified via:

  • cargo clippy --workspace --all-targets --all-features
  • cargo check --benches --examples
  • cargo fmt --all --check
  • Manual grep audit for remaining manual attributes and double-clones.

Are there any user-facing changes?

No.

@github-actions github-actions bot added sql SQL Planner development-process Related to development process of DataFusion logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate catalog Related to the catalog crate common Related to common crate execution Related to the execution crate proto Related to proto crate functions Changes to functions implementation datasource Changes to the datasource crate ffi Changes to the ffi crate physical-plan Changes to the physical-plan crate spark labels Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate common Related to common crate core Core DataFusion crate datasource Changes to the datasource crate development-process Related to development process of DataFusion execution Related to the execution crate ffi Changes to the ffi crate functions Changes to functions implementation logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate proto Related to proto crate spark sql SQL Planner sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable clone_on_ref_ptr Clippy lint for the whole workspace

1 participant