-
Notifications
You must be signed in to change notification settings - Fork 1.8k
deny on allow_attributes lint in physical-plan #18983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Jefffrey
left a comment
There was a problem hiding this 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)] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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,
}
datafusion/physical-plan/src/joins/piecewise_merge_join/exec.rs
Outdated
Show resolved
Hide resolved
| /// be called from a trait object. | ||
| /// Related ticket: https://github.com/apache/datafusion/pull/11047 | ||
| #[allow(dead_code)] | ||
| #[expect(unused)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #[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)] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Yes I'm fine with including physical-expr changes as long as they aren't too massive on their own |
alamb
left a comment
There was a problem hiding this 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
Which issue does this PR close?
clippy::allow_attributes#18881.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