chore: enforce clippy::allow_attributes for proto, pruning, session#19350
Merged
Jefffrey merged 7 commits intoapache:mainfrom Dec 17, 2025
Merged
Conversation
38 tasks
Jefffrey
reviewed
Dec 16, 2025
| include!("datafusion_proto_common.rs"); | ||
|
|
||
| #[cfg(feature = "json")] | ||
| #[allow(clippy::allow_attributes)] |
Contributor
There was a problem hiding this comment.
Is this not covered by the #![allow(clippy::allow_attributes)] above?
Contributor
There was a problem hiding this comment.
Not sure about the changes to this file; can we maintain the previous code whilst fixing the lints?
Jefffrey
reviewed
Dec 16, 2025
Comment on lines
158
to
169
| #[cfg_attr(not(feature = "parquet"), allow(unused_variables))] | ||
| #[cfg(feature = "parquet")] | ||
| PhysicalPlanType::ParquetScan(scan) => { | ||
| self.try_into_parquet_scan_physical_plan(scan, ctx, extension_codec) | ||
| } | ||
| #[cfg_attr(not(feature = "avro"), allow(unused_variables))] | ||
| #[cfg(not(feature = "parquet"))] | ||
| PhysicalPlanType::ParquetScan(_) => { | ||
| panic!( | ||
| "Unable to process a Parquet PhysicalPlan when `parquet` feature is not enabled" | ||
| ) | ||
| } | ||
| #[cfg(feature = "avro")] | ||
| PhysicalPlanType::AvroScan(scan) => { |
Contributor
There was a problem hiding this comment.
I still don't see why these changes are necessary to fix the lints 🤔
Can we just keep things simple? I believe we can just remove these cfg_attrs and at the actual functions (e.g. try_into_parquet_scan_physical_plan) we fix the lint to use expect. I don't expect code changes other than to attributes
Jefffrey
reviewed
Dec 17, 2025
Jefffrey
approved these changes
Dec 17, 2025
Contributor
|
Thanks @kumarUjjawal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
clippy::allow_attributes#18881 .Rationale for this change
We want to use
#[expect]in place of#[allow]on the workspace level but to get there we wanted to do this in few crates at a time before enabling it in workspace.What changes are included in this PR?
Attributes changes for the following crates:
Are these changes tested?
Yes
Are there any user-facing changes?