Skip to content

Conversation

@YuraLitvinov
Copy link
Contributor

@YuraLitvinov YuraLitvinov commented Nov 28, 2025

Which issue does this PR close?

What changes are included in this PR?

Deny attribute for allow_attrbute lint on physical-plan, this allows it to not be applied on imported crates, also, a few of the functions no longer required their respective lints, such as too_many_arguments, hence, I had them removed.

Are these changes tested?

I've ran the entire clippy suite before creating a PR.

Are there any user-facing changes?

There weren't any user-facing changes

@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Nov 28, 2025
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up

/// Represents a 2D coordinate in the rendered tree.
/// Used to track positions of nodes and their connections.
#[allow(dead_code)]
#[expect(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we place these on the fields themselves instead of the struct, to make it clear its the fields that are unused?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant like this:

pub struct Coordinate {
    /// Horizontal position in the tree
    #[expect(dead_code)]
    pub x: usize,
    /// Vertical position in the tree
    #[expect(dead_code)]
    pub y: usize,
}

/// be called from a trait object.
/// Related ticket: https://github.com/apache/datafusion/pull/11047
#[allow(dead_code)]
#[expect(unused)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[expect(unused)]
#[expect(dead_code)]

// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
// https://github.com/apache/datafusion/issues/18503
#![deny(clippy::needless_pass_by_value)]
Copy link
Contributor

@Jefffrey Jefffrey Nov 29, 2025

Choose a reason for hiding this comment

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

Unrelated to this PR, but @2010YOUY01 were we supposed to remove these denys for needless_pass_by_value in each of the lib.rs as part of #18904?

(Doesn't need to be addressed by this PR, just something it made it realize)

Edit: raised #18996

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jefffrey Hi, thank you for feedback. How about I do another crate too and let it be physical-expr, so we can just pack each PR more densely with changes?

@Jefffrey
Copy link
Contributor

Hi, thank you for feedback. How about I do another crate too and let it be physical-expr, so we can just pack each PR more densely with changes?

Yes I'm fine with including physical-expr changes as long as they aren't too massive on their own

@github-actions github-actions bot added the physical-expr Changes to the physical-expr crates label Nov 29, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks great to me too -- thanks @YuraLitvinov and @Jefffrey

It looks like all the outstanding comments were addressed so I'll merge this one in. If there are other changes we want to make, let's do them in follow on PRs

@alamb alamb added this pull request to the merge queue Dec 1, 2025
Merged via the queue into apache:main with commit 5519b61 Dec 1, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants